﻿using netDxf;
using netDxf.Entities;
using netDxf.Header;
using netDxf.Tables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestDxfDocument
{
    class sz
    {
        public static void ISYC_301_01(Dictionary<string, Object> data)//细柄螺纹切削丝锥(简化版)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            /*var scale = 2;
            var oal = 47.0 * scale;//总长
            var dconms = 4 * scale;//柄径
            var l3 = 31 * scale;//柄部长度
            var drvl = 4 * scale;
            var thl = 15.25 * scale;
            var td = 6 * scale;
            var tcpd = 5.13 * scale;*/

            double scale = Convert.ToDouble(data["scale"]);
            double oal = Convert.ToDouble(data["oal"]) * scale;
            double dconms = Convert.ToDouble(data["dconms"]) * scale;
            double drvl = Convert.ToDouble(data["drvl"]) * scale;
            double thl = 15.25 * scale;
            double td = 6 * scale;
            double tcpd = Convert.ToDouble(data["tcpd"]) * scale;
            var thl1 = Convert.ToDouble(data["thl"]);
            var td1 = Convert.ToDouble(data["td"]);
            var tcl = Convert.ToDouble(data["tcl"]);
            var fha = Convert.ToDouble(data["fha"]);
            double l3 = oal - thl - 1.5;
            //柄部

            var v1 = new Vector2(0, 0);
            var v0 = fun.Polar(v1, 0, oal);
            var v2 = fun.Polar(v1, 90 * pi / 180, dconms / 2);
            var v3 = fun.Polar(v2, 0, 0.8 / 3.31 * dconms / 2);
            var v8 = fun.Polar(v2, -90 * pi / 180, 1.48 / 3.31 * dconms / 2);
            var v9 = fun.Polar(v8, 0, drvl);
            var v6 = fun.Polar(v2, 0, fun.CalDistance(v8, v9));
            var v5 = fun.Polar(v6, pi, fun.CalDistance(v3, v2));
            var v4 = fun.mirrorpoint(v3, v8, v9);
            var v7 = fun.mirrorpoint(v5, v8, v9);
            var v10 = fun.Polar(v2, 0, l3);
            var v3p = fun.mirrorpoint(v3, v0, v1);
            var v4p = fun.mirrorpoint(v4, v0, v1);
            var v5p = fun.mirrorpoint(v5, v0, v1);
            var v6p = fun.mirrorpoint(v6, v0, v1);
            var v7p = fun.mirrorpoint(v7, v0, v1);
            var v8p = fun.mirrorpoint(v8, v0, v1);
            var v9p = fun.mirrorpoint(v9, v0, v1);
            var v10p = fun.mirrorpoint(v10, v0, v1);



            var arc1 = fun.DrawArc3(v3, v8, v4);
            var arc2 = fun.DrawArc3(v7, v9, v5);
            var arc3 = fun.DrawArc3(v4p, v8p, v3p);
            var arc4 = fun.DrawArc3(v5p, v9p, v7p);
            var line1 = new Line(v8, v8p);
            var polyline1 = Pus.AddPointsToLwPolyLine(v7, v4, v4p, v7p, v7);
            var polyline2 = Pus.AddPointsToLwPolyLine(v3, v5, v6);
            var polyline3 = Pus.AddPointsToLwPolyLine(v3p, v5p, v6p);
            var polyline4 = Pus.AddPointsToLwPolyLine(v6, v6p, v10p, v10, v6);

            //dxf.AddEntity(new EntityObject[] { arc1, arc2, arc3, arc4, line1, polyline1, polyline2, polyline3, polyline4 });



            //刀头

            var v11 = new Vector2(v0.X - thl, v0.Y + tcpd / 2);
            var v12 = new Vector2(v0.X, v11.Y);
            var v11p = fun.mirrorpoint(v11, v0, v1);
            var v12p = fun.mirrorpoint(v12, v0, v1);

            var polyline5 = Pus.AddPointsToLwPolyLine(v11p, v10p, v10, v11);
            //dxf.AddEntity(polyline5);


            var a1 = new Vector2(v11.X + 0.33 / 30.48 * thl, v11.Y + 0.8 / 12.75 * td);
            var a2 = new Vector2(v11.X + 0.93 / 30.48 * thl, v11.Y);
            var a3 = new Vector2(v11.X + 1.58 / 30.48 * thl, v11.Y + 0.71 / 12.75 * td);
            var a4 = new Vector2(v11.X + 2.09 / 30.48 * thl, v11.Y - 0.05 / 12.75 * td);
            var a5 = new Vector2(v11.X + 2.78 / 30.48 * thl, v11.Y + 0.66 / 12.75 * td);
            var a6 = new Vector2(v11.X + 3.36 / 30.48 * thl, v11.Y - 0.15 / 12.75 * td);
            var a7 = new Vector2(v11.X + 4.1 / 30.48 * thl, v11.Y + 0.39 / 12.75 * td);
            var a8 = new Vector2(v11.X + 4.73 / 30.48 * thl, v11.Y - 0.34 / 12.75 * td);
            var a9 = new Vector2(v11.X + 5.36 / 30.48 * thl, v11.Y + 0.2 / 12.75 * td);
            var a10 = new Vector2(v11.X + 5.99 / 30.48 * thl, v11.Y - 0.52 / 12.75 * td);
            var a11 = new Vector2(v11.X + 6.61 / 30.48 * thl, v11.Y + 0.2 / 12.75 * td);
            var a12 = new Vector2(v11.X + 7.24 / 30.48 * thl, v11.Y - 0.72 / 12.75 * td);
            var a13 = new Vector2(v11.X + 7.78 / 30.48 * thl, v11.Y - 0.25 / 12.75 * td);
            var a14 = new Vector2(v11.X + 8.42 / 30.48 * thl, v11.Y - 0.99 / 12.75 * td);
            var a15 = new Vector2(v11.X + 9.05 / 30.48 * thl, v11.Y - 0.57 / 12.75 * td);
            var a16 = new Vector2(v11.X + 9.69 / 30.48 * thl, v11.Y - 1.3 / 12.75 * td);
            var a17 = new Vector2(v11.X + 10.26 / 30.48 * thl, v11.Y - 0.82 / 12.75 * td);
            var a18 = new Vector2(v11.X + 11 / 30.48 * thl, v11.Y - 1.57 / 12.75 * td);
            var a19 = new Vector2(v11.X + 11.78 / 30.48 * thl, v11.Y - 1.22 / 12.75 * td);
            var a20 = new Vector2(v11.X + 27.58 / 30.48 * thl, v11.Y - 6.72 / 12.75 * td);
            var a21 = new Vector2(v12.X, v12.Y - 6.91 / 12.75 * td);
            var a22 = fun.Inters(a19, a20, new Vector2(v11.X + 12.47, v11.Y), new Vector2(v11.X + 12.47, v11.Y - 1));
            var a23 = fun.Inters(a19, a20, new Vector2(v11.X + 13.06, v11.Y), new Vector2(v11.X + 13.06, v11.Y - 1));
            var a24 = fun.Inters(a19, a20, new Vector2(v11.X + 13.68, v11.Y), new Vector2(v11.X + 13.68, v11.Y - 1));
            var a25 = fun.Inters(a19, a20, new Vector2(v11.X + 14.37, v11.Y), new Vector2(v11.X + 14.37, v11.Y - 1));
            var a26 = fun.Inters(a19, a20, new Vector2(v11.X + 14.91, v11.Y), new Vector2(v11.X + 14.91, v11.Y - 1));
            var a27 = fun.Inters(a19, a20, new Vector2(v11.X + 15.53, v11.Y), new Vector2(v11.X + 15.53, v11.Y - 1));
            var a28 = fun.Inters(a19, a20, new Vector2(v11.X + 16.13, v11.Y), new Vector2(v11.X + 16.13, v11.Y - 1));
            var a29 = fun.Inters(a19, a20, new Vector2(v11.X + 16.71, v11.Y), new Vector2(v11.X + 16.71, v11.Y - 1));
            var a30 = fun.Inters(a19, a20, new Vector2(v11.X + 17.38, v11.Y), new Vector2(v11.X + 17.38, v11.Y - 1));
            var a31 = fun.Inters(a19, a20, new Vector2(v11.X + 17.87, v11.Y), new Vector2(v11.X + 17.87, v11.Y - 1));
            var a32 = fun.Inters(a19, a20, new Vector2(v11.X + 18.64, v11.Y), new Vector2(v11.X + 18.64, v11.Y - 1));
            var a33 = fun.Inters(a19, a20, new Vector2(v11.X + 19.24, v11.Y), new Vector2(v11.X + 19.24, v11.Y - 1));
            var a34 = fun.Inters(a19, a20, new Vector2(v11.X + 19.81, v11.Y), new Vector2(v11.X + 19.81, v11.Y - 1));
            var a35 = fun.Inters(a19, a20, new Vector2(v11.X + 20.44, v11.Y), new Vector2(v11.X + 20.44, v11.Y - 1));
            var a36 = fun.Inters(a19, a20, new Vector2(v11.X + 21.11, v11.Y), new Vector2(v11.X + 21.11, v11.Y - 1));
            var a37 = fun.Inters(a19, a20, new Vector2(v11.X + 21.83, v11.Y), new Vector2(v11.X + 21.83, v11.Y - 1));
            var a38 = fun.Inters(a19, a20, new Vector2(v11.X + 22.31, v11.Y), new Vector2(v11.X + 22.31, v11.Y - 1));
            var a39 = fun.Inters(a19, a20, new Vector2(v11.X + 23.04, v11.Y), new Vector2(v11.X + 23.04, v11.Y - 1));
            var a40 = fun.Inters(a19, a20, new Vector2(v11.X + 23.64, v11.Y), new Vector2(v11.X + 23.64, v11.Y - 1));
            var a41 = fun.Inters(a19, a20, new Vector2(v11.X + 24.31, v11.Y), new Vector2(v11.X + 24.31, v11.Y - 1));
            var a42 = fun.Inters(a19, a20, new Vector2(v11.X + 24.95, v11.Y), new Vector2(v11.X + 24.95, v11.Y - 1));
            var a43 = fun.Inters(a19, a20, new Vector2(v11.X + 25.53, v11.Y), new Vector2(v11.X + 25.53, v11.Y - 1));
            var a44 = fun.Inters(a19, a20, new Vector2(v11.X + 26.28, v11.Y), new Vector2(v11.X + 26.28, v11.Y - 1));
            var a45 = fun.Inters(a19, a20, new Vector2(v11.X + 26.65, v11.Y), new Vector2(v11.X + 26.65, v11.Y - 1));
            var a46 = fun.Inters(a19, a20, new Vector2(v11.X + 27.17, v11.Y), new Vector2(v11.X + 27.17, v11.Y - 1));
            var a47 = fun.Polar(v11, -90 * pi / 180, 3.43 / 12.75 * td);
            var a48 = fun.Inters(a47, fun.Polar(a47, 36 * pi / 180, 1), a1, fun.Polar(a1, 267 * pi / 180, 1));
            var a49 = fun.Inters(a48, fun.Polar(a48, 307 * pi / 180, 1), a2, fun.Polar(a2, 267 * pi / 180, 1));
            var a50 = fun.Inters(a49, fun.Polar(a49, 31 * pi / 180, 1), a3, fun.Polar(a3, 267 * pi / 180, 1));
            var a51 = fun.Inters(a50, fun.Polar(a50, 301 * pi / 180, 1), a4, fun.Polar(a4, 267 * pi / 180, 1));
            var a52 = fun.Inters(a51, fun.Polar(a51, 31 * pi / 180, 1), a5, fun.Polar(a5, 267 * pi / 180, 1));
            var a53 = fun.Inters(a52, fun.Polar(a52, 301 * pi / 180, 1), a6, fun.Polar(a6, 267 * pi / 180, 1));
            var a54 = fun.Inters(a53, fun.Polar(a53, 31 * pi / 180, 1), a7, fun.Polar(a7, 267 * pi / 180, 1));
            var a55 = fun.Inters(a54, fun.Polar(a54, 324 * pi / 180, 1), a8, fun.Polar(a8, 267 * pi / 180, 1));
            var a56 = fun.Inters(a55, fun.Polar(a55, 10 * pi / 180, 1), a9, fun.Polar(a9, 267 * pi / 180, 1));
            var a57 = fun.Inters(a56, fun.Polar(a56, 339 * pi / 180, 1), a25, fun.Polar(a25, 267 * pi / 180, 1));
            var a58 = fun.Inters(a56, a57, a10, fun.Polar(a10, 267 * pi / 180, 1));
            var a59 = fun.Inters(a56, a57, a11, fun.Polar(a11, 267 * pi / 180, 1));
            var a60 = fun.Inters(a56, a57, a12, fun.Polar(a12, 267 * pi / 180, 1));
            var a61 = fun.Inters(a56, a57, a13, fun.Polar(a13, 267 * pi / 180, 1));
            var a62 = fun.Inters(a56, a57, a14, fun.Polar(a14, 267 * pi / 180, 1));
            var a63 = fun.Inters(a56, a57, a15, fun.Polar(a15, 267 * pi / 180, 1));
            var a64 = fun.Inters(a56, a57, a16, fun.Polar(a16, 267 * pi / 180, 1));
            var a65 = fun.Inters(a56, a57, a17, fun.Polar(a17, 267 * pi / 180, 1));
            var a66 = fun.Inters(a56, a57, a18, fun.Polar(a18, 267 * pi / 180, 1));
            var a67 = fun.Inters(a56, a57, a19, fun.Polar(a19, 267 * pi / 180, 1));
            var a68 = fun.Inters(a56, a57, a22, fun.Polar(a22, 267 * pi / 180, 1));
            var a69 = fun.Inters(a56, a57, a23, fun.Polar(a23, 267 * pi / 180, 1));
            var a70 = fun.Inters(a56, a57, a24, fun.Polar(a24, 267 * pi / 180, 1));
            var a71 = fun.Inters(a70, fun.Polar(a70, 2 * pi / 180, 1), a26, fun.Polar(a26, 267 * pi / 180, 1));
            var a72 = fun.Inters(a71, fun.Polar(a71, 321 * pi / 180, 1), a27, fun.Polar(a27, 267 * pi / 180, 1));
            var a73 = fun.Inters(a72, fun.Polar(a72, 14 * pi / 180, 1), a28, fun.Polar(a28, 267 * pi / 180, 1));
            var a74 = fun.Inters(a73, fun.Polar(a73, 319 * pi / 180, 1), a29, fun.Polar(a29, 267 * pi / 180, 1));
            var a75 = fun.Inters(a74, fun.Polar(a74, 20 * pi / 180, 1), a30, fun.Polar(a30, 267 * pi / 180, 1));
            var a76 = fun.Inters(a75, fun.Polar(a75, 307 * pi / 180, 1), a31, fun.Polar(a31, 267 * pi / 180, 1));
            var a77 = fun.Inters(a76, fun.Polar(a76, 28 * pi / 180, 1), a32, fun.Polar(a32, 267 * pi / 180, 1));
            var a78 = fun.Inters(a77, fun.Polar(a77, 311 * pi / 180, 1), a33, fun.Polar(a33, 267 * pi / 180, 1));
            var a79 = fun.Inters(a78, fun.Polar(a78, 22 * pi / 180, 1), a34, fun.Polar(a34, 267 * pi / 180, 1));
            var a80 = fun.Inters(a79, fun.Polar(a79, 312 * pi / 180, 1), a35, fun.Polar(a35, 267 * pi / 180, 1));
            var a81 = fun.Inters(a80, fun.Polar(a80, 33 * pi / 180, 1), a36, fun.Polar(a36, 267 * pi / 180, 1));
            var a82 = fun.Inters(a81, fun.Polar(a81, 318 * pi / 180, 1), a37, fun.Polar(a37, 267 * pi / 180, 1));
            var a83 = fun.Inters(a82, fun.Polar(a82, 32 * pi / 180, 1), a38, fun.Polar(a38, 267 * pi / 180, 1));
            var a84 = fun.Inters(a83, fun.Polar(a83, 311 * pi / 180, 1), a39, fun.Polar(a39, 267 * pi / 180, 1));
            var a85 = fun.Inters(a84, fun.Polar(a84, 41 * pi / 180, 1), a40, fun.Polar(a40, 267 * pi / 180, 1));
            var a86 = fun.Inters(a85, fun.Polar(a85, 311 * pi / 180, 1), a41, fun.Polar(a41, 267 * pi / 180, 1));
            var a87 = fun.Inters(a86, fun.Polar(a86, 39 * pi / 180, 1), a42, fun.Polar(a42, 267 * pi / 180, 1));
            var a88 = fun.Inters(a87, fun.Polar(a87, 313 * pi / 180, 1), a43, fun.Polar(a43, 267 * pi / 180, 1));
            var a89 = fun.Inters(a88, fun.Polar(a88, 33 * pi / 180, 1), a44, fun.Polar(a44, 267 * pi / 180, 1));
            var a90 = fun.Inters(a89, fun.Polar(a89, 303 * pi / 180, 1), a45, fun.Polar(a45, 267 * pi / 180, 1));
            var a91 = fun.Inters(a90, v12p, a46, fun.Polar(a46, 267 * pi / 180, 1));
            var a92 = fun.Inters(a90, v12p, a20, fun.Polar(a20, 267 * pi / 180, 1));

            var a93 = fun.Polar(a12, fun.CalAngle(a12, a13), fun.CalDistance(a12, a13) / 2);
            var a94 = new Vector2(v11.X + 7.9 / 30.47 * thl, v11.Y + 0.28 / 12.75 * td);
            var a95 = new Vector2(v11.X + 8.39 / 30.47 * thl, v11.Y - 0.31 / 12.75 * td);
            var a96 = new Vector2(v11.X + 9.06 / 30.47 * thl, v11.Y + 0.36 / 12.75 * td);
            var a97 = new Vector2(v11.X + 9.7 / 30.47 * thl, v11.Y - 0.26 / 12.75 * td);
            var a98 = new Vector2(v11.X + 10.34 / 30.47 * thl, v11.Y + 0.52 / 12.75 * td);
            var a99 = new Vector2(v11.X + 11.08 / 30.47 * thl, v11.Y - 0.09 / 12.75 * td);
            var a100 = new Vector2(v11.X + 11.57 / 30.47 * thl, v11.Y + 0.72 / 12.75 * td);
            var a101 = new Vector2(v11.X + 12.24 / 30.47 * thl, v11.Y - 0.06 / 12.75 * td);
            var a102 = new Vector2(v11.X + 12.81 / 30.47 * thl, v11.Y + 0.75 / 12.75 * td);
            var a103 = new Vector2(v11.X + 13.48 / 30.47 * thl, v11.Y + 0.03 / 12.75 * td);
            var a104 = new Vector2(v11.X + 14.11 / 30.47 * thl, v11.Y + 0.83 / 12.75 * td);
            var a105 = new Vector2(v11.X + 14.64 / 30.47 * thl, v11.Y + 0.03 / 12.75 * td);
            var a106 = new Vector2(v11.X + 15.38 / 30.47 * thl, v11.Y + 0.93 / 12.75 * td);
            var a107 = new Vector2(v11.X + 15.96 / 30.47 * thl, v11.Y + 0.04 / 12.75 * td);
            var a108 = new Vector2(v11.X + 16.67 / 30.47 * thl, v11.Y + 0.88 / 12.75 * td);
            var a109 = new Vector2(v11.X + 17.29 / 30.47 * thl, v11.Y + 0.05 / 12.75 * td);
            var a110 = new Vector2(v11.X + 17.88 / 30.47 * thl, v11.Y + 0.84 / 12.75 * td);
            var a111 = new Vector2(v11.X + 18.62 / 30.47 * thl, v11.Y + 0.06 / 12.75 * td);
            var a112 = new Vector2(v11.X + 19.18 / 30.47 * thl, v11.Y + 0.88 / 12.75 * td);
            var a113 = new Vector2(v11.X + 19.76 / 30.47 * thl, v11.Y + 0.07 / 12.75 * td);
            var a114 = new Vector2(v11.X + 20.41 / 30.47 * thl, v11.Y + 0.79 / 12.75 * td);
            var a115 = new Vector2(v11.X + 21.03 / 30.47 * thl, v11.Y + 0.08 / 12.75 * td);
            var a116 = new Vector2(v11.X + 21.54 / 30.47 * thl, v11.Y + 0.72 / 12.75 * td);
            var a117 = new Vector2(v11.X + 22.27 / 30.47 * thl, v11.Y + 0.09 / 12.75 * td);
            var a118 = new Vector2(v11.X + 22.84 / 30.47 * thl, v11.Y + 0.78 / 12.75 * td);
            var a119 = new Vector2(v11.X + 23.54 / 30.47 * thl, v11.Y + 0.1 / 12.75 * td);
            var a120 = new Vector2(v11.X + 24.01 / 30.47 * thl, v11.Y + 0.78 / 12.75 * td);
            var a121 = new Vector2(v11.X + 24.67 / 30.47 * thl, v11.Y + 0.11 / 12.75 * td);
            var a122 = new Vector2(v11.X + 25.32 / 30.47 * thl, v11.Y + 0.71 / 12.75 * td);
            var a123 = new Vector2(v11.X + 25.98 / 30.47 * thl, v11.Y + 0.12 / 12.75 * td);
            var a124 = new Vector2(v11.X + 26.36 / 30.47 * thl, v11.Y + 0.58 / 12.75 * td);
            var a125 = new Vector2(v11.X + 26.9 / 30.47 * thl, v11.Y + 0.36 / 12.75 * td);
            var a126 = new Vector2(v11.X + 27.29 / 30.47 * thl, v11.Y + 0.574 / 12.75 * td);
            var a127 = new Vector2(v11.X + 27.64 / 30.47 * thl, v11.Y + 0.52 / 12.75 * td);
            var a128 = v12;
            var a129 = fun.Inters(a114, fun.Polar(a114, 294 * pi / 180, 1), a115, fun.Polar(a115, 259 * pi / 180, 1));
            var a130 = fun.Inters(a129, fun.Polar(a129, 43 * pi / 180, 1), a116, fun.Polar(a116, 267 * pi / 180, 1));
            var a131 = fun.Inters(a130, fun.Polar(a130, 313 * pi / 180, 1), a117, fun.Polar(a117, 267 * pi / 180, 1));
            var a132 = fun.Inters(a131, fun.Polar(a131, 43 * pi / 180, 1), a118, fun.Polar(a118, 267 * pi / 180, 1));
            var a133 = fun.Inters(a132, fun.Polar(a132, 309 * pi / 180, 1), a119, fun.Polar(a119, 267 * pi / 180, 1));
            var a134 = fun.Inters(a133, fun.Polar(a133, 62 * pi / 180, 1), a120, fun.Polar(a120, 267 * pi / 180, 1));
            var a135 = fun.Inters(a134, fun.Polar(a134, 302 * pi / 180, 1), a121, fun.Polar(a121, 267 * pi / 180, 1));
            var a136 = fun.Inters(a135, fun.Polar(a135, 47 * pi / 180, 1), a122, fun.Polar(a122, 267 * pi / 180, 1));
            var a137 = fun.Inters(a136, fun.Polar(a136, 317 * pi / 180, 1), a123, fun.Polar(a123, 267 * pi / 180, 1));
            var a138 = fun.Inters(a137, fun.Polar(a137, 48 * pi / 180, 1), a124, fun.Polar(a124, 267 * pi / 180, 1));
            var a142 = fun.Polar(v12, -90 * pi / 180, 2.37 / 12.75 * td);
            var a139 = fun.Inters(a138, a142, a125, fun.Polar(a125, 267 * pi / 180, 1));
            var a140 = fun.Inters(a138, a142, a126, fun.Polar(a126, 267 * pi / 180, 1));
            var a141 = fun.Inters(a138, a142, a127, fun.Polar(a127, 267 * pi / 180, 1));


            var a142p = v11p;
            var a143 = new Vector2(v11p.X + 0.4 / 30.47 * thl, v11p.Y - 0.95 / 12.75 * td);
            var a144 = new Vector2(v11p.X + 0.88 / 30.47 * thl, v11p.Y - 0.19 / 12.75 * td);
            var a145 = new Vector2(v11p.X + 1.55 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a146 = new Vector2(v11p.X + 2.17 / 30.47 * thl, v11p.Y - 0.23 / 12.75 * td);
            var a147 = new Vector2(v11p.X + 2.83 / 30.47 * thl, v11p.Y - 0.97 / 12.75 * td);
            var a148 = new Vector2(v11p.X + 3.43 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a149 = new Vector2(v11p.X + 4.09 / 30.47 * thl, v11p.Y - 0.96 / 12.75 * td);
            var a150 = new Vector2(v11p.X + 4.69 / 30.47 * thl, v11p.Y - 0.17 / 12.75 * td);
            var a151 = new Vector2(v11p.X + 5.27 / 30.47 * thl, v11p.Y - 0.95 / 12.75 * td);
            var a152 = new Vector2(v11p.X + 5.88 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a153 = new Vector2(v11p.X + 6.47 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a154 = new Vector2(v11p.X + 7.23 / 30.47 * thl, v11p.Y - 0.17 / 12.75 * td);
            var a155 = new Vector2(v11p.X + 7.81 / 30.47 * thl, v11p.Y - 0.99 / 12.75 * td);
            var a156 = new Vector2(v11p.X + 8.4 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a157 = new Vector2(v11p.X + 9.04 / 30.47 * thl, v11p.Y - 0.94 / 12.75 * td);
            var a158 = new Vector2(v11p.X + 9.81 / 30.47 * thl, v11p.Y - 0.05 / 12.75 * td);
            var a159 = new Vector2(v11p.X + 10.35 / 30.47 * thl, v11p.Y - 0.87 / 12.75 * td);
            var a160 = new Vector2(v11p.X + 11.05 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a161 = new Vector2(v11p.X + 11.64 / 30.47 * thl, v11p.Y - 0.89 / 12.75 * td);
            var a162 = new Vector2(v11p.X + 12.16 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a163 = new Vector2(v11p.X + 12.82 / 30.47 * thl, v11p.Y - 0.89 / 12.75 * td);
            var a164 = new Vector2(v11p.X + 13.47 / 30.47 * thl, v11p.Y - 0.08 / 12.75 * td);
            var a165 = new Vector2(v11p.X + 14.07 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a166 = new Vector2(v11p.X + 14.79 / 30.47 * thl, v11p.Y - 0.12 / 12.75 * td);
            var a167 = new Vector2(v11p.X + 15.34 / 30.47 * thl, v11p.Y - 1 / 12.75 * td);
            var a168 = new Vector2(v11p.X + 16.01 / 30.47 * thl, v11p.Y - 0.13 / 12.75 * td);
            var a169 = new Vector2(v11p.X + 16.6 / 30.47 * thl, v11p.Y - 0.94 / 12.75 * td);
            var a170 = new Vector2(v11p.X + 17.33 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a171 = new Vector2(v11p.X + 17.81 / 30.47 * thl, v11p.Y - 0.74 / 12.75 * td);
            var a172 = new Vector2(v11p.X + 18.49 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a173 = new Vector2(v11p.X + 19.17 / 30.47 * thl, v11p.Y - 0.55 / 12.75 * td);
            var a174 = new Vector2(v11p.X + 19.83 / 30.47 * thl, v11p.Y + 0.2 / 12.75 * td);
            var a175 = new Vector2(v11p.X + 20.36 / 30.47 * thl, v11p.Y - 0.48 / 12.75 * td);
            var a176 = new Vector2(v11p.X + 21.02 / 30.47 * thl, v11p.Y + 0.27 / 12.75 * td);
            var a177 = new Vector2(v11p.X + 21.6 / 30.47 * thl, v11p.Y - 0.24 / 12.75 * td);
            var a178 = new Vector2(v11p.X + 22.13 / 30.47 * thl, v11p.Y + 0.42 / 12.75 * td);
            var a179 = a84;
            var a180 = fun.Polar(a142p, 90 * pi / 180, 1.51 / 12.75 * td);
            var a181 = fun.Inters(a180, fun.Polar(a180, 22 * pi / 180, 1), a144, fun.Polar(a144, 87 * pi / 180, 1));
            var a182 = fun.Inters(a181, fun.Polar(a181, 315 * pi / 180, 1), a145, fun.Polar(a145, 87 * pi / 180, 1));
            var a183 = fun.Inters(a182, fun.Polar(a182, 35 * pi / 180, 1), a146, fun.Polar(a146, 87 * pi / 180, 1));
            var a184 = fun.Inters(a183, fun.Polar(a183, 312 * pi / 180, 1), a147, fun.Polar(a147, 87 * pi / 180, 1));
            var a185 = fun.Inters(a184, fun.Polar(a184, 41 * pi / 180, 1), a148, fun.Polar(a148, 87 * pi / 180, 1));
            var a186 = fun.Inters(a185, fun.Polar(a185, 314 * pi / 180, 1), a149, fun.Polar(a149, 87 * pi / 180, 1));
            var a187 = fun.Inters(a186, fun.Polar(a186, 38 * pi / 180, 1), a150, fun.Polar(a150, 87 * pi / 180, 1));
            var a188 = fun.Inters(a187, fun.Polar(a187, 314 * pi / 180, 1), a151, fun.Polar(a151, 87 * pi / 180, 1));
            var a189 = fun.Inters(a188, fun.Polar(a188, 38 * pi / 180, 1), a152, fun.Polar(a152, 87 * pi / 180, 1));
            var a190 = fun.Inters(a189, fun.Polar(a189, 308 * pi / 180, 1), a153, fun.Polar(a153, 87 * pi / 180, 1));
            var a191 = fun.Inters(a190, fun.Polar(a190, 39 * pi / 180, 1), a154, fun.Polar(a154, 87 * pi / 180, 1));
            var a192 = fun.Inters(a191, fun.Polar(a191, 309 * pi / 180, 1), a155, fun.Polar(a155, 87 * pi / 180, 1));
            var a193 = fun.Inters(a192, fun.Polar(a192, 32 * pi / 180, 1), a156, fun.Polar(a156, 87 * pi / 180, 1));
            var a194 = fun.Inters(a193, fun.Polar(a193, 311 * pi / 180, 1), a157, fun.Polar(a157, 87 * pi / 180, 1));
            var a195 = new Vector2(v11.X - 1 / 30.47 * thl, v11.Y - 4.14 / 12.75 * td);
            var a196 = new Vector2(v10.X, v11.Y - 5.8 / 12.75 * td);
            var a197 = new Vector2(v11.X - 0.98 / 30.47 * thl, v11.Y - 7.7 / 12.75 * td);


            var polyline6 = Pus.AddPointsToLwPolyLine(v11, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21);
            var polyline7 = Pus.AddPointsToLwPolyLine(a47, a48, a49, a50, a51, a52, a53, a54, a55, a56, a57, a71, a72, a73, a74, a75, a76, a77, a78, a79, a80, a81, a82, a83, a84, a85, a86, a87, a88, a89, a90, v12p);
            var polyline8 = Pus.AddPointsToLwPolyLine(a93, a94, a95, a96, a97, a98, a99, a100, a101, a102, a103, a104, a105, a106, a107, a108, a109, a110, a111, a112, a113, a114, a115, a116, a117, a118, a119, a120, a121, a122, a123, a124, a125, a126, a127, v12);
            var polyline9 = Pus.AddPointsToLwPolyLine(a114, a129, a130, a131, a132, a133, a134, a135, a136, a137, a138, a142);
            var polyline10 = Pus.AddPointsToLwPolyLine(a142p, a143, a144, a145, a146, a147, a148, a149, a150, a151, a152, a153, a154, a155, a156, a157, a158, a159, a160, a161, a162, a163, a164, a165, a166, a167, a168, a169, a170, a171, a172, a173, a174, a175, a176, a177, a178, a179);
            var polyline11 = Pus.AddPointsToLwPolyLine(a180, a181, a182, a183, a184, a185, a186, a187, a188, a189, a190, a191, a192, a193, a194, a158);
            /* dxf.AddEntity(polyline6);
             dxf.AddEntity(polyline7);
             dxf.AddEntity(polyline8);
             dxf.AddEntity(polyline9);
             dxf.AddEntity(polyline10);
             dxf.AddEntity(polyline11);*/

            var line2 = new Line(a1, a48);
            var line3 = new Line(a2, a49);
            var line4 = new Line(a3, a50);
            var line5 = new Line(a4, a51);
            var line6 = new Line(a5, a52);
            var line7 = new Line(a6, a53);
            var line8 = new Line(a7, a54);
            var line9 = new Line(a8, a55);
            var line10 = new Line(a9, a56);
            var line11 = new Line(a10, a58);
            var line12 = new Line(a11, a59);
            var line13 = new Line(a12, a60);
            var line14 = new Line(a13, a61);
            var line15 = new Line(a14, a62);
            var line16 = new Line(a15, a63);
            var line17 = new Line(a16, a64);
            var line18 = new Line(a17, a65);
            var line19 = new Line(a18, a66);
            var line20 = new Line(a19, a67);
            var line21 = new Line(a22, a68);
            var line22 = new Line(a23, a69);
            var line23 = new Line(a24, a70);
            var line24 = new Line(a25, a57);
            var line25 = new Line(a26, a71);
            var line26 = new Line(a27, a72);
            var line27 = new Line(a28, a73);
            var line28 = new Line(a29, a74);
            var line29 = new Line(a30, a75);
            var line30 = new Line(a31, a76);
            var line31 = new Line(a32, a77);
            var line32 = new Line(a33, a78);
            var line33 = new Line(a34, a79);
            var line34 = new Line(a35, a80);
            var line35 = new Line(a36, a81);
            var line36 = new Line(a37, a82);
            var line37 = new Line(a38, a83);
            var line38 = new Line(a39, a84);
            var line39 = new Line(a40, a85);
            var line40 = new Line(a41, a86);
            var line41 = new Line(a42, a87);
            var line42 = new Line(a43, a88);
            var line43 = new Line(a44, a89);
            var line44 = new Line(a45, a90);
            var line45 = new Line(a46, a91);
            var line46 = new Line(a20, a92);
            var line47 = new Line(a115, a129);
            var line48 = new Line(a116, a130);
            var line49 = new Line(a117, a131);
            var line50 = new Line(a118, a132);
            var line51 = new Line(a119, a133);
            var line52 = new Line(a120, a134);
            var line53 = new Line(a121, a135);
            var line54 = new Line(a122, a136);
            var line55 = new Line(a123, a137);
            var line56 = new Line(a124, a138);
            var line57 = new Line(a125, a139);
            var line58 = new Line(a126, a140);
            var line59 = new Line(a127, a141);
            var line60 = new Line(v11, v11p);
            var line61 = new Line(a181, a144);
            var line62 = new Line(a182, a145);
            var line63 = new Line(a183, a146);
            var line64 = new Line(a184, a147);
            var line65 = new Line(a185, a148);
            var line66 = new Line(a186, a149);
            var line67 = new Line(a187, a150);
            var line68 = new Line(a188, a151);
            var line69 = new Line(a189, a152);
            var line70 = new Line(a190, a153);
            var line71 = new Line(a191, a154);
            var line72 = new Line(a192, a155);
            var line73 = new Line(a193, a156);
            var line74 = new Line(a194, a157);
            var line75 = new Line(v12, v12p);

            var arc5 = fun.DrawArc3(a47, a195, a196);
            var arc6 = fun.DrawArc3(a196, a197, a180);

            var line01 = Pus.Mirrorline(line1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line02 = Pus.Mirrorline(line2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line03 = Pus.Mirrorline(line3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line04 = Pus.Mirrorline(line4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line05 = Pus.Mirrorline(line5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line06 = Pus.Mirrorline(line6, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line07 = Pus.Mirrorline(line7, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line08 = Pus.Mirrorline(line8, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line09 = Pus.Mirrorline(line9, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line010 = Pus.Mirrorline(line10, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line011 = Pus.Mirrorline(line11, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line012 = Pus.Mirrorline(line12, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line013 = Pus.Mirrorline(line13, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line014 = Pus.Mirrorline(line14, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line015 = Pus.Mirrorline(line15, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line016 = Pus.Mirrorline(line16, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line017 = Pus.Mirrorline(line17, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line018 = Pus.Mirrorline(line18, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line019 = Pus.Mirrorline(line19, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line020 = Pus.Mirrorline(line20, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line021 = Pus.Mirrorline(line21, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line022 = Pus.Mirrorline(line22, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line023 = Pus.Mirrorline(line23, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line024 = Pus.Mirrorline(line24, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line025 = Pus.Mirrorline(line25, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line026 = Pus.Mirrorline(line26, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line027 = Pus.Mirrorline(line27, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line028 = Pus.Mirrorline(line28, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line029 = Pus.Mirrorline(line29, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line030 = Pus.Mirrorline(line30, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line031 = Pus.Mirrorline(line31, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line032 = Pus.Mirrorline(line32, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line033 = Pus.Mirrorline(line33, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line034 = Pus.Mirrorline(line34, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line035 = Pus.Mirrorline(line35, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line036 = Pus.Mirrorline(line36, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line037 = Pus.Mirrorline(line37, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line038 = Pus.Mirrorline(line38, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line039 = Pus.Mirrorline(line39, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line040 = Pus.Mirrorline(line40, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line041 = Pus.Mirrorline(line41, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line042 = Pus.Mirrorline(line42, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line043 = Pus.Mirrorline(line43, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line044 = Pus.Mirrorline(line44, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line045 = Pus.Mirrorline(line45, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line046 = Pus.Mirrorline(line46, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line047 = Pus.Mirrorline(line47, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line048 = Pus.Mirrorline(line48, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line049 = Pus.Mirrorline(line49, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line050 = Pus.Mirrorline(line50, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line051 = Pus.Mirrorline(line51, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line052 = Pus.Mirrorline(line52, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line053 = Pus.Mirrorline(line53, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line054 = Pus.Mirrorline(line54, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line055 = Pus.Mirrorline(line55, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line056 = Pus.Mirrorline(line56, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line057 = Pus.Mirrorline(line57, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line058 = Pus.Mirrorline(line58, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line059 = Pus.Mirrorline(line59, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line060 = Pus.Mirrorline(line60, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line061 = Pus.Mirrorline(line61, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line062 = Pus.Mirrorline(line62, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line063 = Pus.Mirrorline(line63, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line064 = Pus.Mirrorline(line64, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line065 = Pus.Mirrorline(line65, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line066 = Pus.Mirrorline(line66, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line067 = Pus.Mirrorline(line67, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line068 = Pus.Mirrorline(line68, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line069 = Pus.Mirrorline(line69, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line070 = Pus.Mirrorline(line70, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line071 = Pus.Mirrorline(line71, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line072 = Pus.Mirrorline(line72, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line073 = Pus.Mirrorline(line73, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line074 = Pus.Mirrorline(line74, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line075 = Pus.Mirrorline(line75, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline01 = Pus.MirrorPolyline(polyline1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline02 = Pus.MirrorPolyline(polyline2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline03 = Pus.MirrorPolyline(polyline3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline04 = Pus.MirrorPolyline(polyline4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline05 = Pus.MirrorPolyline(polyline5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline06 = Pus.MirrorPolyline(polyline6, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline07 = Pus.MirrorPolyline(polyline7, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline08 = Pus.MirrorPolyline(polyline8, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline09 = Pus.MirrorPolyline(polyline9, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline010 = Pus.MirrorPolyline(polyline10, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline011 = Pus.MirrorPolyline(polyline11, v1, fun.Polar(v1, 90 * pi / 180, 1));

            fun.drawBline(dxf, line01, 0.2, contour);
            fun.drawBline(dxf, line02, 0.2, contour);
            fun.drawBline(dxf, line03, 0.2, contour);
            fun.drawBline(dxf, line04, 0.2, contour);
            fun.drawBline(dxf, line05, 0.2, contour);
            fun.drawBline(dxf, line06, 0.2, contour);
            fun.drawBline(dxf, line07, 0.2, contour);
            fun.drawBline(dxf, line08, 0.2, contour);
            fun.drawBline(dxf, line09, 0.2, contour);
            fun.drawBline(dxf, line010, 0.2, contour);
            fun.drawBline(dxf, line011, 0.2, contour);
            fun.drawBline(dxf, line012, 0.2, contour);
            fun.drawBline(dxf, line013, 0.2, contour);
            fun.drawBline(dxf, line014, 0.2, contour);
            fun.drawBline(dxf, line015, 0.2, contour);
            fun.drawBline(dxf, line016, 0.2, contour);
            fun.drawBline(dxf, line017, 0.2, contour);
            fun.drawBline(dxf, line018, 0.2, contour);
            fun.drawBline(dxf, line019, 0.2, contour);
            fun.drawBline(dxf, line020, 0.2, contour);
            fun.drawBline(dxf, line021, 0.2, contour);
            fun.drawBline(dxf, line022, 0.2, contour);
            fun.drawBline(dxf, line023, 0.2, contour);
            fun.drawBline(dxf, line024, 0.2, contour);
            fun.drawBline(dxf, line025, 0.2, contour);
            fun.drawBline(dxf, line026, 0.2, contour);
            fun.drawBline(dxf, line027, 0.2, contour);
            fun.drawBline(dxf, line028, 0.2, contour);
            fun.drawBline(dxf, line029, 0.2, contour);
            fun.drawBline(dxf, line030, 0.2, contour);
            fun.drawBline(dxf, line031, 0.2, contour);
            fun.drawBline(dxf, line032, 0.2, contour);
            fun.drawBline(dxf, line033, 0.2, contour);
            fun.drawBline(dxf, line034, 0.2, contour);
            fun.drawBline(dxf, line035, 0.2, contour);
            fun.drawBline(dxf, line036, 0.2, contour);
            fun.drawBline(dxf, line037, 0.2, contour);
            fun.drawBline(dxf, line038, 0.2, contour);
            fun.drawBline(dxf, line039, 0.2, contour);
            fun.drawBline(dxf, line040, 0.2, contour);
            fun.drawBline(dxf, line041, 0.2, contour);
            fun.drawBline(dxf, line042, 0.2, contour);
            fun.drawBline(dxf, line043, 0.2, contour);
            fun.drawBline(dxf, line044, 0.2, contour);
            fun.drawBline(dxf, line045, 0.2, contour);
            fun.drawBline(dxf, line046, 0.2, contour);
            fun.drawBline(dxf, line047, 0.2, contour);
            fun.drawBline(dxf, line048, 0.2, contour);
            fun.drawBline(dxf, line049, 0.2, contour);
            fun.drawBline(dxf, line050, 0.2, contour);
            fun.drawBline(dxf, line051, 0.2, contour);
            fun.drawBline(dxf, line052, 0.2, contour);
            fun.drawBline(dxf, line053, 0.2, contour);
            fun.drawBline(dxf, line054, 0.2, contour);
            fun.drawBline(dxf, line055, 0.2, contour);
            fun.drawBline(dxf, line056, 0.2, contour);
            fun.drawBline(dxf, line057, 0.2, contour);
            fun.drawBline(dxf, line058, 0.2, contour);
            fun.drawBline(dxf, line059, 0.2, contour);
            fun.drawBline(dxf, line060, 0.2, contour);
            fun.drawBline(dxf, line061, 0.2, contour);
            fun.drawBline(dxf, line062, 0.2, contour);
            fun.drawBline(dxf, line063, 0.2, contour);
            fun.drawBline(dxf, line064, 0.2, contour);
            fun.drawBline(dxf, line065, 0.2, contour);
            fun.drawBline(dxf, line066, 0.2, contour);
            fun.drawBline(dxf, line067, 0.2, contour);
            fun.drawBline(dxf, line068, 0.2, contour);
            fun.drawBline(dxf, line069, 0.2, contour);
            fun.drawBline(dxf, line070, 0.2, contour);
            fun.drawBline(dxf, line071, 0.2, contour);
            fun.drawBline(dxf, line072, 0.2, contour);
            fun.drawBline(dxf, line073, 0.2, contour);
            fun.drawBline(dxf, line074, 0.2, contour);
            fun.drawBline(dxf, line075, 0.2, contour);
            fun.PolyFill(dxf, polyline01, 0.2, contour);
            fun.PolyFill(dxf, polyline02, 0.2, contour);
            fun.PolyFill(dxf, polyline03, 0.2, contour);
            fun.PolyFill(dxf, polyline04, 0.2, contour);
            fun.PolyFill(dxf, polyline05, 0.2, contour);
            fun.PolyFill(dxf, polyline06, 0.2, contour);
            fun.PolyFill(dxf, polyline07, 0.2, contour);
            fun.PolyFill(dxf, polyline08, 0.2, contour);
            fun.PolyFill(dxf, polyline09, 0.2, contour);
            fun.PolyFill(dxf, polyline010, 0.2, contour);
            fun.PolyFill(dxf, polyline011, 0.2, contour);

            var arc01 = fun.mirrorarc(arc1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc02 = fun.mirrorarc(arc2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc03 = fun.mirrorarc(arc3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc04 = fun.mirrorarc(arc4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc05 = fun.mirrorarc(arc5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc06 = fun.mirrorarc(arc6, v1, fun.Polar(v1, 90 * pi / 180, 1));


            fun.drawBArc(dxf, arc01, 0.2, contour);
            fun.drawBArc(dxf, arc02, 0.2, contour);
            fun.drawBArc(dxf, arc03, 0.2, contour);
            fun.drawBArc(dxf, arc04, 0.2, contour);
            fun.drawBArc(dxf, arc05, 0.2, contour);
            fun.drawBArc(dxf, arc06, 0.2, contour);


            //dxf.AddEntity(new EntityObject[] { line2, line3, line4, line5, line6, line7, line8, line9, line10, line11, line12, line13, line14, line15, line16, line17, line18, line19, line20, line21, line22, line23, line24, line25, line26, line27, line28, line29, line30, line31, line32, line33, line34, line35, line36, line37, line38, line39, line40, line41, line42, line43, line44, line45, line46 });
            //dxf.AddEntity(new EntityObject[] { line47, line48, line49, line50, line51, line52, line53, line54, line55, line56, line57, line58, line59, line60, line61, line62, line63, line64, line65, line66, line67, line68, line69, line70, line71, line72, line73, line74, line75 });
            //dxf.AddEntity(new EntityObject[] { arc5, arc6 });


            var z1 = fun.Polar(v1, 0, 16.58 / 51.69 * oal);
            var z2 = fun.Polar(v1, 0, 25.37 / 51.69 * oal);

            Line line00 = new Line(fun.Polar(v1, 0, 5), fun.Polar(v1, pi, oal + 5));
            line00.Layer = centre;
            line00.Lineweight = Lineweight.W25;
            line00.Linetype = Linetype.DashDot;
            dxf.AddEntity(line00);

            //标注

            var height = 2 * scale;//字体高度
            var offset = 10 * scale;//偏移量
            var arrowsize = 1 * scale;//箭头大小
            var exline = 1 * scale;//延伸线长度
          //  if (oal != 47) 
            
                fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-v12.X, v12.Y), 0, offset * 2, 0, height, arrowsize, exline, "" + oal / scale, "", "");
                fun.dimrot1(dxf, new Vector2(-v11.X, v11.Y), new Vector2(-v12.X, v12.Y), 0, offset, 0, height, arrowsize, exline, "" + thl1, "", "");
                fun.dimrot1(dxf, new Vector2(-a90.X, a90.Y), new Vector2(-v12p.X, v12p.Y), 180, offset * 0.8, 0, height, arrowsize, exline, ""+ tcl + " * P", "", "");
                fun.dimrot1(dxf, new Vector2(-v3.X, v3.Y), new Vector2(-v3p.X, v3p.Y), -90, offset * 0.8, 0, height, arrowsize, exline, "" + dconms / scale, "", "");
                fun.dimrot1(dxf, new Vector2(-v12.X, v12.Y), new Vector2(-v12p.X, v12p.Y), 90, offset * 0.8, 0, height, arrowsize, exline, "" + tcpd / scale, "", "");
            fun.dimrot1(dxf, new Vector2(-a163.X, a163.Y), new Vector2(-a106.X, a106.Y), 90, offset * 2.5, 0, height, arrowsize, exline, "" + td1, "", "");
            fun.jdbz2(dxf, new Line(fun.Polar(v1, pi, oal + 5), fun.Polar(v1, 0, 5)), new Line(new Vector2(-a20.X, a20.Y), new Vector2(-a19.X, a19.Y)), offset * 2, height, arrowsize, exline, "" + fha + "°", "", "");

            /*   else 
               {

                   fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-v12.X, v12.Y), 0, offset * 2, 0, height, arrowsize, exline, "OAL", "", "");
                   fun.dimrot1(dxf, new Vector2(-v11.X, v11.Y), new Vector2(-v12.X, v12.Y), 0, offset, 0, height, arrowsize, exline, "THL", "", "");
                   fun.dimrot1(dxf, new Vector2(-a90.X, a90.Y), new Vector2(-v12p.X, v12p.Y), 180, offset * 0.8, 0, height, arrowsize, exline, "TCL", "", "");
                   fun.dimrot1(dxf, new Vector2(-v3.X, v3.Y), new Vector2(-v3p.X, v3p.Y), -90, offset * 0.8, 0, height, arrowsize, exline, "DMM", "", "");
                   fun.dimrot1(dxf, new Vector2(-v12.X, v12.Y), new Vector2(-v12p.X, v12p.Y), 90, offset * 0.8, 0, height, arrowsize, exline, "TCPD", "", "");
                   fun.dimrot1(dxf, new Vector2(-a163.X, a163.Y), new Vector2(-a106.X, a106.Y), 90, offset * 2.5, 0, height, arrowsize, exline, "TD", "", "");
               }
            */
            double isframe = Convert.ToInt32(data["isframe"]);
            String isframe_chose = Convert.ToString(data["isframe_chose"]);
            Vector2 p0 = new Vector2(0, 0);
            if (isframe == 1)
            {
                if (isframe_chose.Equals("0"))
                {
                    Dictionary<string, Vector2> position = Frame.frameA0X(dxf, new Vector2(p0.X - 1189 / 2.0, p0.Y + 841 / 2.0), data);
                    fun.writetext(dxf, scale + ":1", position["比例"], 3.5, 0, 0.6, "C");
                }

                if (isframe_chose.Equals("1"))
                {
                    Dictionary<string, Vector2> position = Frame.frameA1X(dxf, new Vector2(p0.X - 841 / 2.0, p0.Y + 594 / 2.0), data);
                    fun.writetext(dxf, scale + ":1", position["比例"], 3.5, 0, 0.6, "C");
                }

                if (isframe_chose.Equals("2"))
                {
                    Dictionary<string, Vector2> position = Frame.frameA2X(dxf, new Vector2(p0.X - 594 / 2.0, p0.Y + 420 / 2.0), data);
                    fun.writetext(dxf, scale + ":1", position["比例"], 3.5, 0, 0.6, "C");
                }

                if (isframe_chose.Equals("3"))
                {
                    Dictionary<string, Vector2> position = Frame.frameA3X(dxf, new Vector2(p0.X - 420 / 2.0, p0.Y + 297 / 2.0), data);
                    fun.writetext(dxf, scale + ":1", position["比例"], 3.5, 0, 0.6, "C");
                }

                if (isframe_chose.Equals("4X"))
                {
                    Dictionary<string, Vector2> position = Frame.frameA4X(dxf, new Vector2(p0.X - 297 / 2.0, p0.Y + 210 / 2.0 - 10 * 2.26), data);
                    fun.writetext(dxf, scale + ":1", position["比例"], 3.5, 0, 0.6, "C");
                }

                if (isframe_chose.Equals("4Y"))
                {
                    Dictionary<string, Vector2> position = Frame.frameA4Y(dxf, new Vector2(p0.X - 210 / 2.0, p0.Y + 297 / 2.0), data);
                    fun.writetext(dxf, scale + ":1", position["比例"], 3.5, 0, 0.6, "C");
                }
            }


            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void ISYC_301_01_complete(Dictionary<string, Object> data)//细柄螺纹切削丝锥
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            var scale = 2;
            var oal = 47.0 * scale;//总长
            var dconms = 4 * scale;//柄径
            var l3 = 31 * scale;//柄部长度
            var drvl = 4 * scale;
            var thl = 15.25 * scale;
            var td = 6 * scale;
            var tcpd = 5.13 * scale;

            //柄部

            var v1 = new Vector2(0, 0);
            var v0 = fun.Polar(v1, 0, oal);
            var v2 = fun.Polar(v1, 90 * pi / 180, dconms / 2);
            var v3 = fun.Polar(v2, 0, 0.8 / 3.31 * dconms / 2);
            var v8 = fun.Polar(v2, -90 * pi / 180, 1.48 / 3.31 * dconms / 2);
            var v9 = fun.Polar(v8, 0, drvl);
            var v6 = fun.Polar(v2, 0, fun.CalDistance(v8, v9));
            var v5 = fun.Polar(v6, pi, fun.CalDistance(v3, v2));
            var v4 = fun.mirrorpoint(v3, v8, v9);
            var v7 = fun.mirrorpoint(v5, v8, v9);
            var v10 = fun.Polar(v2, 0, l3);
            var v3p = fun.mirrorpoint(v3, v0, v1);
            var v4p = fun.mirrorpoint(v4, v0, v1);
            var v5p = fun.mirrorpoint(v5, v0, v1);
            var v6p = fun.mirrorpoint(v6, v0, v1);
            var v7p = fun.mirrorpoint(v7, v0, v1);
            var v8p = fun.mirrorpoint(v8, v0, v1);
            var v9p = fun.mirrorpoint(v9, v0, v1);
            var v10p = fun.mirrorpoint(v10, v0, v1);

            var l1 = fun.Polar(v5, fun.CalAngle(v5, v6), fun.CalDistance(v5, v6) / 2);

            var arc1 = fun.DrawArc3(v3, v8, v4);
            var arc2 = fun.DrawArc3(v7, v9, v5);
            var arc3 = fun.DrawArc3(v4p, v8p, v3p);
            var arc4 = fun.DrawArc3(v5p, v9p, v7p);
            var line1 = new Line(v8, v8p);
            var polyline1 = Pus.AddPointsToLwPolyLine(v7, v4, v4p, v7p, v7);
            var polyline2 = Pus.AddPointsToLwPolyLine(v3, v5, v6);
            var polyline3 = Pus.AddPointsToLwPolyLine(v3p, v5p, v6p);
            var polyline4 = Pus.AddPointsToLwPolyLine(v6, v6p, v10p, v10, v6);

            //dxf.AddEntity(new EntityObject[] { arc1, arc2, arc3, arc4, line1, polyline1, polyline2, polyline3, polyline4 });



            //刀头

            var v11 = new Vector2(v0.X - thl, v0.Y + tcpd / 2);
            var v12 = new Vector2(v0.X, v11.Y);
            var v11p = fun.mirrorpoint(v11, v0, v1);
            var v12p = fun.mirrorpoint(v12, v0, v1);

            var polyline5 = Pus.AddPointsToLwPolyLine(v11p, v10p, v10, v11);
            //dxf.AddEntity(polyline5);


            var a1 = new Vector2(v11.X + 0.33 / 30.48 * thl, v11.Y + 0.8 / 12.75 * td);
            var a2 = new Vector2(v11.X + 0.93 / 30.48 * thl, v11.Y);
            var a3 = new Vector2(v11.X + 1.58 / 30.48 * thl, v11.Y + 0.71 / 12.75 * td);
            var a4 = new Vector2(v11.X + 2.09 / 30.48 * thl, v11.Y - 0.05 / 12.75 * td);
            var a5 = new Vector2(v11.X + 2.78 / 30.48 * thl, v11.Y + 0.66 / 12.75 * td);
            var a6 = new Vector2(v11.X + 3.36 / 30.48 * thl, v11.Y - 0.15 / 12.75 * td);
            var a7 = new Vector2(v11.X + 4.1 / 30.48 * thl, v11.Y + 0.39 / 12.75 * td);
            var a8 = new Vector2(v11.X + 4.73 / 30.48 * thl, v11.Y - 0.34 / 12.75 * td);
            var a9 = new Vector2(v11.X + 5.36 / 30.48 * thl, v11.Y + 0.2 / 12.75 * td);
            var a10 = new Vector2(v11.X + 5.99 / 30.48 * thl, v11.Y - 0.52 / 12.75 * td);
            var a11 = new Vector2(v11.X + 6.61 / 30.48 * thl, v11.Y + 0.2 / 12.75 * td);
            var a12 = new Vector2(v11.X + 7.24 / 30.48 * thl, v11.Y - 0.72 / 12.75 * td);
            var a13 = new Vector2(v11.X + 7.78 / 30.48 * thl, v11.Y - 0.25 / 12.75 * td);
            var a14 = new Vector2(v11.X + 8.42 / 30.48 * thl, v11.Y - 0.99 / 12.75 * td);
            var a15 = new Vector2(v11.X + 9.05 / 30.48 * thl, v11.Y - 0.57 / 12.75 * td);
            var a16 = new Vector2(v11.X + 9.69 / 30.48 * thl, v11.Y - 1.3 / 12.75 * td);
            var a17 = new Vector2(v11.X + 10.26 / 30.48 * thl, v11.Y - 0.82 / 12.75 * td);
            var a18 = new Vector2(v11.X + 11 / 30.48 * thl, v11.Y - 1.57 / 12.75 * td);
            var a19 = new Vector2(v11.X + 11.78 / 30.48 * thl, v11.Y - 1.22 / 12.75 * td);
            var a20 = new Vector2(v11.X + 27.58 / 30.48 * thl, v11.Y - 6.72 / 12.75 * td);
            var a21 = new Vector2(v12.X, v12.Y - 6.91 / 12.75 * td);
            var a22 = fun.Inters(a19, a20, new Vector2(v11.X + 12.47, v11.Y), new Vector2(v11.X + 12.47, v11.Y - 1));
            var a23 = fun.Inters(a19, a20, new Vector2(v11.X + 13.06, v11.Y), new Vector2(v11.X + 13.06, v11.Y - 1));
            var a24 = fun.Inters(a19, a20, new Vector2(v11.X + 13.68, v11.Y), new Vector2(v11.X + 13.68, v11.Y - 1));
            var a25 = fun.Inters(a19, a20, new Vector2(v11.X + 14.37, v11.Y), new Vector2(v11.X + 14.37, v11.Y - 1));
            var a26 = fun.Inters(a19, a20, new Vector2(v11.X + 14.91, v11.Y), new Vector2(v11.X + 14.91, v11.Y - 1));
            var a27 = fun.Inters(a19, a20, new Vector2(v11.X + 15.53, v11.Y), new Vector2(v11.X + 15.53, v11.Y - 1));
            var a28 = fun.Inters(a19, a20, new Vector2(v11.X + 16.13, v11.Y), new Vector2(v11.X + 16.13, v11.Y - 1));
            var a29 = fun.Inters(a19, a20, new Vector2(v11.X + 16.71, v11.Y), new Vector2(v11.X + 16.71, v11.Y - 1));
            var a30 = fun.Inters(a19, a20, new Vector2(v11.X + 17.38, v11.Y), new Vector2(v11.X + 17.38, v11.Y - 1));
            var a31 = fun.Inters(a19, a20, new Vector2(v11.X + 17.87, v11.Y), new Vector2(v11.X + 17.87, v11.Y - 1));
            var a32 = fun.Inters(a19, a20, new Vector2(v11.X + 18.64, v11.Y), new Vector2(v11.X + 18.64, v11.Y - 1));
            var a33 = fun.Inters(a19, a20, new Vector2(v11.X + 19.24, v11.Y), new Vector2(v11.X + 19.24, v11.Y - 1));
            var a34 = fun.Inters(a19, a20, new Vector2(v11.X + 19.81, v11.Y), new Vector2(v11.X + 19.81, v11.Y - 1));
            var a35 = fun.Inters(a19, a20, new Vector2(v11.X + 20.44, v11.Y), new Vector2(v11.X + 20.44, v11.Y - 1));
            var a36 = fun.Inters(a19, a20, new Vector2(v11.X + 21.11, v11.Y), new Vector2(v11.X + 21.11, v11.Y - 1));
            var a37 = fun.Inters(a19, a20, new Vector2(v11.X + 21.83, v11.Y), new Vector2(v11.X + 21.83, v11.Y - 1));
            var a38 = fun.Inters(a19, a20, new Vector2(v11.X + 22.31, v11.Y), new Vector2(v11.X + 22.31, v11.Y - 1));
            var a39 = fun.Inters(a19, a20, new Vector2(v11.X + 23.04, v11.Y), new Vector2(v11.X + 23.04, v11.Y - 1));
            var a40 = fun.Inters(a19, a20, new Vector2(v11.X + 23.64, v11.Y), new Vector2(v11.X + 23.64, v11.Y - 1));


             
            var a41 = fun.Inters(a19, a20, new Vector2(v11.X + 24.31, v11.Y), new Vector2(v11.X + 24.31, v11.Y - 1));
            var a42 = fun.Inters(a19, a20, new Vector2(v11.X + 24.95, v11.Y), new Vector2(v11.X + 24.95, v11.Y - 1));
            var a43 = fun.Inters(a19, a20, new Vector2(v11.X + 25.53, v11.Y), new Vector2(v11.X + 25.53, v11.Y - 1));
            var a44 = fun.Inters(a19, a20, new Vector2(v11.X + 26.28, v11.Y), new Vector2(v11.X + 26.28, v11.Y - 1));
            var a45 = fun.Inters(a19, a20, new Vector2(v11.X + 26.65, v11.Y), new Vector2(v11.X + 26.65, v11.Y - 1));
            var a46 = fun.Inters(a19, a20, new Vector2(v11.X + 27.17, v11.Y), new Vector2(v11.X + 27.17, v11.Y - 1));
            var a47 = fun.Polar(v11, -90 * pi / 180, 3.43 / 12.75 * td);
            var a48 = fun.Inters(a47, fun.Polar(a47, 36 * pi / 180, 1), a1, fun.Polar(a1, 267 * pi / 180, 1));
            var a49 = fun.Inters(a48, fun.Polar(a48, 307 * pi / 180, 1), a2, fun.Polar(a2, 267 * pi / 180, 1));
            var a50 = fun.Inters(a49, fun.Polar(a49, 31 * pi / 180, 1), a3, fun.Polar(a3, 267 * pi / 180, 1));
            var a51 = fun.Inters(a50, fun.Polar(a50, 301 * pi / 180, 1), a4, fun.Polar(a4, 267 * pi / 180, 1));
            var a52 = fun.Inters(a51, fun.Polar(a51, 31 * pi / 180, 1), a5, fun.Polar(a5, 267 * pi / 180, 1));
            var a53 = fun.Inters(a52, fun.Polar(a52, 301 * pi / 180, 1), a6, fun.Polar(a6, 267 * pi / 180, 1));
            var a54 = fun.Inters(a53, fun.Polar(a53, 31 * pi / 180, 1), a7, fun.Polar(a7, 267 * pi / 180, 1));
            var a55 = fun.Inters(a54, fun.Polar(a54, 324 * pi / 180, 1), a8, fun.Polar(a8, 267 * pi / 180, 1));
            var a56 = fun.Inters(a55, fun.Polar(a55, 10 * pi / 180, 1), a9, fun.Polar(a9, 267 * pi / 180, 1));
            var a57 = fun.Inters(a56, fun.Polar(a56, 339 * pi / 180, 1), a25, fun.Polar(a25, 267 * pi / 180, 1));
            var a58 = fun.Inters(a56, a57, a10, fun.Polar(a10, 267 * pi / 180, 1));
            var a59 = fun.Inters(a56, a57, a11, fun.Polar(a11, 267 * pi / 180, 1));
            var a60 = fun.Inters(a56, a57, a12, fun.Polar(a12, 267 * pi / 180, 1));
            var a61 = fun.Inters(a56, a57, a13, fun.Polar(a13, 267 * pi / 180, 1));
            var a62 = fun.Inters(a56, a57, a14, fun.Polar(a14, 267 * pi / 180, 1));
            var a63 = fun.Inters(a56, a57, a15, fun.Polar(a15, 267 * pi / 180, 1));
            var a64 = fun.Inters(a56, a57, a16, fun.Polar(a16, 267 * pi / 180, 1));
            var a65 = fun.Inters(a56, a57, a17, fun.Polar(a17, 267 * pi / 180, 1));
            var a66 = fun.Inters(a56, a57, a18, fun.Polar(a18, 267 * pi / 180, 1));
            var a67 = fun.Inters(a56, a57, a19, fun.Polar(a19, 267 * pi / 180, 1));
            var a68 = fun.Inters(a56, a57, a22, fun.Polar(a22, 267 * pi / 180, 1));
            var a69 = fun.Inters(a56, a57, a23, fun.Polar(a23, 267 * pi / 180, 1));
            var a70 = fun.Inters(a56, a57, a24, fun.Polar(a24, 267 * pi / 180, 1));
            var a71 = fun.Inters(a70, fun.Polar(a70, 2 * pi / 180, 1), a26, fun.Polar(a26, 267 * pi / 180, 1));
            var a72 = fun.Inters(a71, fun.Polar(a71, 321 * pi / 180, 1), a27, fun.Polar(a27, 267 * pi / 180, 1));
            var a73 = fun.Inters(a72, fun.Polar(a72, 14 * pi / 180, 1), a28, fun.Polar(a28, 267 * pi / 180, 1));
            var a74 = fun.Inters(a73, fun.Polar(a73, 319 * pi / 180, 1), a29, fun.Polar(a29, 267 * pi / 180, 1));
            var a75 = fun.Inters(a74, fun.Polar(a74, 20 * pi / 180, 1), a30, fun.Polar(a30, 267 * pi / 180, 1));
            var a76 = fun.Inters(a75, fun.Polar(a75, 307 * pi / 180, 1), a31, fun.Polar(a31, 267 * pi / 180, 1));
            var a77 = fun.Inters(a76, fun.Polar(a76, 28 * pi / 180, 1), a32, fun.Polar(a32, 267 * pi / 180, 1));
            var a78 = fun.Inters(a77, fun.Polar(a77, 311 * pi / 180, 1), a33, fun.Polar(a33, 267 * pi / 180, 1));
            var a79 = fun.Inters(a78, fun.Polar(a78, 22 * pi / 180, 1), a34, fun.Polar(a34, 267 * pi / 180, 1));
            var a80 = fun.Inters(a79, fun.Polar(a79, 312 * pi / 180, 1), a35, fun.Polar(a35, 267 * pi / 180, 1));
            var a81 = fun.Inters(a80, fun.Polar(a80, 33 * pi / 180, 1), a36, fun.Polar(a36, 267 * pi / 180, 1));
            var a82 = fun.Inters(a81, fun.Polar(a81, 318 * pi / 180, 1), a37, fun.Polar(a37, 267 * pi / 180, 1));
            var a83 = fun.Inters(a82, fun.Polar(a82, 32 * pi / 180, 1), a38, fun.Polar(a38, 267 * pi / 180, 1));
            var a84 = fun.Inters(a83, fun.Polar(a83, 311 * pi / 180, 1), a39, fun.Polar(a39, 267 * pi / 180, 1));
            var a85 = fun.Inters(a84, fun.Polar(a84, 41 * pi / 180, 1), a40, fun.Polar(a40, 267 * pi / 180, 1));
            var a86 = fun.Inters(a85, fun.Polar(a85, 311 * pi / 180, 1), a41, fun.Polar(a41, 267 * pi / 180, 1));
            var a87 = fun.Inters(a86, fun.Polar(a86, 39 * pi / 180, 1), a42, fun.Polar(a42, 267 * pi / 180, 1));
            var a88 = fun.Inters(a87, fun.Polar(a87, 313 * pi / 180, 1), a43, fun.Polar(a43, 267 * pi / 180, 1));
            var a89 = fun.Inters(a88, fun.Polar(a88, 33 * pi / 180, 1), a44, fun.Polar(a44, 267 * pi / 180, 1));
            var a90 = fun.Inters(a89, fun.Polar(a89, 303 * pi / 180, 1), a45, fun.Polar(a45, 267 * pi / 180, 1));
            var a91 = fun.Inters(a90, v12p, a46, fun.Polar(a46, 267 * pi / 180, 1));
            var a92 = fun.Inters(a90, v12p, a20, fun.Polar(a20, 267 * pi / 180, 1));

            var a93 = fun.Polar(a12, fun.CalAngle(a12, a13), fun.CalDistance(a12, a13) / 2);
            var a94 = new Vector2(v11.X + 7.9 / 30.47 * thl, v11.Y + 0.28 / 12.75 * td);
            var a95 = new Vector2(v11.X + 8.39 / 30.47 * thl, v11.Y - 0.31 / 12.75 * td);
            var a96 = new Vector2(v11.X + 9.06 / 30.47 * thl, v11.Y + 0.36 / 12.75 * td);
            var a97 = new Vector2(v11.X + 9.7 / 30.47 * thl, v11.Y - 0.26 / 12.75 * td);
            var a98 = new Vector2(v11.X + 10.34 / 30.47 * thl, v11.Y + 0.52 / 12.75 * td);
            var a99 = new Vector2(v11.X + 11.08 / 30.47 * thl, v11.Y - 0.09 / 12.75 * td);
            var a100 = new Vector2(v11.X + 11.57 / 30.47 * thl, v11.Y + 0.72 / 12.75 * td);
            var a101 = new Vector2(v11.X + 12.24 / 30.47 * thl, v11.Y - 0.06 / 12.75 * td);
            var a102 = new Vector2(v11.X + 12.81 / 30.47 * thl, v11.Y + 0.75 / 12.75 * td);
            var a103 = new Vector2(v11.X + 13.48 / 30.47 * thl, v11.Y + 0.03 / 12.75 * td);
            var a104 = new Vector2(v11.X + 14.11 / 30.47 * thl, v11.Y + 0.83 / 12.75 * td);
            var a105 = new Vector2(v11.X + 14.64 / 30.47 * thl, v11.Y + 0.03 / 12.75 * td);
            var a106 = new Vector2(v11.X + 15.38 / 30.47 * thl, v11.Y + 0.93 / 12.75 * td);
            var a107 = new Vector2(v11.X + 15.96 / 30.47 * thl, v11.Y + 0.04 / 12.75 * td);
            var a108 = new Vector2(v11.X + 16.67 / 30.47 * thl, v11.Y + 0.88 / 12.75 * td);
            var a109 = new Vector2(v11.X + 17.29 / 30.47 * thl, v11.Y + 0.05 / 12.75 * td);
            var a110 = new Vector2(v11.X + 17.88 / 30.47 * thl, v11.Y + 0.84 / 12.75 * td);
            var a111 = new Vector2(v11.X + 18.62 / 30.47 * thl, v11.Y + 0.06 / 12.75 * td);
            var a112 = new Vector2(v11.X + 19.18 / 30.47 * thl, v11.Y + 0.88 / 12.75 * td);
            var a113 = new Vector2(v11.X + 19.76 / 30.47 * thl, v11.Y + 0.07 / 12.75 * td);
            var a114 = new Vector2(v11.X + 20.41 / 30.47 * thl, v11.Y + 0.79 / 12.75 * td);
            var a115 = new Vector2(v11.X + 21.03 / 30.47 * thl, v11.Y + 0.08 / 12.75 * td);
            var a116 = new Vector2(v11.X + 21.54 / 30.47 * thl, v11.Y + 0.72 / 12.75 * td);
            var a117 = new Vector2(v11.X + 22.27 / 30.47 * thl, v11.Y + 0.09 / 12.75 * td);
            var a118 = new Vector2(v11.X + 22.84 / 30.47 * thl, v11.Y + 0.78 / 12.75 * td);
            var a119 = new Vector2(v11.X + 23.54 / 30.47 * thl, v11.Y + 0.1 / 12.75 * td);
            var a120 = new Vector2(v11.X + 24.01 / 30.47 * thl, v11.Y + 0.78 / 12.75 * td);
            var a121 = new Vector2(v11.X + 24.67 / 30.47 * thl, v11.Y + 0.11 / 12.75 * td);
            var a122 = new Vector2(v11.X + 25.32 / 30.47 * thl, v11.Y + 0.71 / 12.75 * td);
            var a123 = new Vector2(v11.X + 25.98 / 30.47 * thl, v11.Y + 0.12 / 12.75 * td);
            var a124 = new Vector2(v11.X + 26.36 / 30.47 * thl, v11.Y + 0.58 / 12.75 * td);
            var a125 = new Vector2(v11.X + 26.9 / 30.47 * thl, v11.Y + 0.36 / 12.75 * td);
            var a126 = new Vector2(v11.X + 27.29 / 30.47 * thl, v11.Y + 0.574 / 12.75 * td);
            var a127 = new Vector2(v11.X + 27.64 / 30.47 * thl, v11.Y + 0.52 / 12.75 * td);
            var a128 = v12;
            var a129 = fun.Inters(a114, fun.Polar(a114, 294 * pi / 180, 1), a115, fun.Polar(a115, 259 * pi / 180, 1));
            var a130 = fun.Inters(a129, fun.Polar(a129, 43 * pi / 180, 1), a116, fun.Polar(a116, 267 * pi / 180, 1));
            var a131 = fun.Inters(a130, fun.Polar(a130, 313 * pi / 180, 1), a117, fun.Polar(a117, 267 * pi / 180, 1));
            var a132 = fun.Inters(a131, fun.Polar(a131, 43 * pi / 180, 1), a118, fun.Polar(a118, 267 * pi / 180, 1));
            var a133 = fun.Inters(a132, fun.Polar(a132, 309 * pi / 180, 1), a119, fun.Polar(a119, 267 * pi / 180, 1));
            var a134 = fun.Inters(a133, fun.Polar(a133, 62 * pi / 180, 1), a120, fun.Polar(a120, 267 * pi / 180, 1));
            var a135 = fun.Inters(a134, fun.Polar(a134, 302 * pi / 180, 1), a121, fun.Polar(a121, 267 * pi / 180, 1));
            var a136 = fun.Inters(a135, fun.Polar(a135, 47 * pi / 180, 1), a122, fun.Polar(a122, 267 * pi / 180, 1));
            var a137 = fun.Inters(a136, fun.Polar(a136, 317 * pi / 180, 1), a123, fun.Polar(a123, 267 * pi / 180, 1));
            var a138 = fun.Inters(a137, fun.Polar(a137, 48 * pi / 180, 1), a124, fun.Polar(a124, 267 * pi / 180, 1));
            var a142 = fun.Polar(v12, -90 * pi / 180, 2.37 / 12.75 * td);
            var a139 = fun.Inters(a138, a142, a125, fun.Polar(a125, 267 * pi / 180, 1));
            var a140 = fun.Inters(a138, a142, a126, fun.Polar(a126, 267 * pi / 180, 1));
            var a141 = fun.Inters(a138, a142, a127, fun.Polar(a127, 267 * pi / 180, 1));


            var a142p = v11p;
            var a143 = new Vector2(v11p.X + 0.4 / 30.47 * thl, v11p.Y - 0.95 / 12.75 * td);
            var a144 = new Vector2(v11p.X + 0.88 / 30.47 * thl, v11p.Y - 0.19 / 12.75 * td);
            var a145 = new Vector2(v11p.X + 1.55 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a146 = new Vector2(v11p.X + 2.17 / 30.47 * thl, v11p.Y - 0.23 / 12.75 * td);
            var a147 = new Vector2(v11p.X + 2.83 / 30.47 * thl, v11p.Y - 0.97 / 12.75 * td);
            var a148 = new Vector2(v11p.X + 3.43 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a149 = new Vector2(v11p.X + 4.09 / 30.47 * thl, v11p.Y - 0.96 / 12.75 * td);
            var a150 = new Vector2(v11p.X + 4.69 / 30.47 * thl, v11p.Y - 0.17 / 12.75 * td);
            var a151 = new Vector2(v11p.X + 5.27 / 30.47 * thl, v11p.Y - 0.95 / 12.75 * td);
            var a152 = new Vector2(v11p.X + 5.88 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a153 = new Vector2(v11p.X + 6.47 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a154 = new Vector2(v11p.X + 7.23 / 30.47 * thl, v11p.Y - 0.17 / 12.75 * td);
            var a155 = new Vector2(v11p.X + 7.81 / 30.47 * thl, v11p.Y - 0.99 / 12.75 * td);
            var a156 = new Vector2(v11p.X + 8.4 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a157 = new Vector2(v11p.X + 9.04 / 30.47 * thl, v11p.Y - 0.94 / 12.75 * td);
            var a158 = new Vector2(v11p.X + 9.81 / 30.47 * thl, v11p.Y - 0.05 / 12.75 * td);
            var a159 = new Vector2(v11p.X + 10.35 / 30.47 * thl, v11p.Y - 0.87 / 12.75 * td);
            var a160 = new Vector2(v11p.X + 11.05 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a161 = new Vector2(v11p.X + 11.64 / 30.47 * thl, v11p.Y - 0.89 / 12.75 * td);
            var a162 = new Vector2(v11p.X + 12.16 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a163 = new Vector2(v11p.X + 12.82 / 30.47 * thl, v11p.Y - 0.89 / 12.75 * td);
            var a164 = new Vector2(v11p.X + 13.47 / 30.47 * thl, v11p.Y - 0.08 / 12.75 * td);
            var a165 = new Vector2(v11p.X + 14.07 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a166 = new Vector2(v11p.X + 14.79 / 30.47 * thl, v11p.Y - 0.12 / 12.75 * td);
            var a167 = new Vector2(v11p.X + 15.34 / 30.47 * thl, v11p.Y - 1 / 12.75 * td);
            var a168 = new Vector2(v11p.X + 16.01 / 30.47 * thl, v11p.Y - 0.13 / 12.75 * td);
            var a169 = new Vector2(v11p.X + 16.6 / 30.47 * thl, v11p.Y - 0.94 / 12.75 * td);
            var a170 = new Vector2(v11p.X + 17.33 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a171 = new Vector2(v11p.X + 17.81 / 30.47 * thl, v11p.Y - 0.74 / 12.75 * td);
            var a172 = new Vector2(v11p.X + 18.49 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a173 = new Vector2(v11p.X + 19.17 / 30.47 * thl, v11p.Y - 0.55 / 12.75 * td);
            var a174 = new Vector2(v11p.X + 19.83 / 30.47 * thl, v11p.Y + 0.2 / 12.75 * td);
            var a175 = new Vector2(v11p.X + 20.36 / 30.47 * thl, v11p.Y - 0.48 / 12.75 * td);
            var a176 = new Vector2(v11p.X + 21.02 / 30.47 * thl, v11p.Y + 0.27 / 12.75 * td);
            var a177 = new Vector2(v11p.X + 21.6 / 30.47 * thl, v11p.Y - 0.24 / 12.75 * td);
            var a178 = new Vector2(v11p.X + 22.13 / 30.47 * thl, v11p.Y + 0.42 / 12.75 * td);
            var a179 = a84;
            var a180 = fun.Polar(a142p, 90 * pi / 180, 1.51 / 12.75 * td);
            var a181 = fun.Inters(a180, fun.Polar(a180, 22 * pi / 180, 1), a144, fun.Polar(a144, 87 * pi / 180, 1));
            var a182 = fun.Inters(a181, fun.Polar(a181, 315 * pi / 180, 1), a145, fun.Polar(a145, 87 * pi / 180, 1));
            var a183 = fun.Inters(a182, fun.Polar(a182, 35 * pi / 180, 1), a146, fun.Polar(a146, 87 * pi / 180, 1));
            var a184 = fun.Inters(a183, fun.Polar(a183, 312 * pi / 180, 1), a147, fun.Polar(a147, 87 * pi / 180, 1));
            var a185 = fun.Inters(a184, fun.Polar(a184, 41 * pi / 180, 1), a148, fun.Polar(a148, 87 * pi / 180, 1));
            var a186 = fun.Inters(a185, fun.Polar(a185, 314 * pi / 180, 1), a149, fun.Polar(a149, 87 * pi / 180, 1));
            var a187 = fun.Inters(a186, fun.Polar(a186, 38 * pi / 180, 1), a150, fun.Polar(a150, 87 * pi / 180, 1));
            var a188 = fun.Inters(a187, fun.Polar(a187, 314 * pi / 180, 1), a151, fun.Polar(a151, 87 * pi / 180, 1));
            var a189 = fun.Inters(a188, fun.Polar(a188, 38 * pi / 180, 1), a152, fun.Polar(a152, 87 * pi / 180, 1));
            var a190 = fun.Inters(a189, fun.Polar(a189, 308 * pi / 180, 1), a153, fun.Polar(a153, 87 * pi / 180, 1));
            var a191 = fun.Inters(a190, fun.Polar(a190, 39 * pi / 180, 1), a154, fun.Polar(a154, 87 * pi / 180, 1));
            var a192 = fun.Inters(a191, fun.Polar(a191, 309 * pi / 180, 1), a155, fun.Polar(a155, 87 * pi / 180, 1));
            var a193 = fun.Inters(a192, fun.Polar(a192, 32 * pi / 180, 1), a156, fun.Polar(a156, 87 * pi / 180, 1));
            var a194 = fun.Inters(a193, fun.Polar(a193, 311 * pi / 180, 1), a157, fun.Polar(a157, 87 * pi / 180, 1));
            var a195 = new Vector2(v11.X - 1 / 30.47 * thl, v11.Y - 4.14 / 12.75 * td);
            var a196 = new Vector2(v10.X, v11.Y - 5.8 / 12.75 * td);
            var a197 = new Vector2(v11.X - 0.98 / 30.47 * thl, v11.Y - 7.7 / 12.75 * td);


            var polyline6 = Pus.AddPointsToLwPolyLine(v11, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21);
            var polyline7 = Pus.AddPointsToLwPolyLine(a47, a48, a49, a50, a51, a52, a53, a54, a55, a56, a57, a71, a72, a73, a74, a75, a76, a77, a78, a79, a80, a81, a82, a83, a84, a85, a86, a87, a88, a89, a90, v12p);
            var polyline8 = Pus.AddPointsToLwPolyLine(a93, a94, a95, a96, a97, a98, a99, a100, a101, a102, a103, a104, a105, a106, a107, a108, a109, a110, a111, a112, a113, a114, a115, a116, a117, a118, a119, a120, a121, a122, a123, a124, a125, a126, a127, v12);
            var polyline9 = Pus.AddPointsToLwPolyLine(a114, a129, a130, a131, a132, a133, a134, a135, a136, a137, a138, a142);
            var polyline10 = Pus.AddPointsToLwPolyLine(a142p, a143, a144, a145, a146, a147, a148, a149, a150, a151, a152, a153, a154, a155, a156, a157, a158, a159, a160, a161, a162, a163, a164, a165, a166, a167, a168, a169, a170, a171, a172, a173, a174, a175, a176, a177, a178, a179);
            var polyline11 = Pus.AddPointsToLwPolyLine(a180, a181, a182, a183, a184, a185, a186, a187, a188, a189, a190, a191, a192, a193, a194, a158);
            /* dxf.AddEntity(polyline6);
             dxf.AddEntity(polyline7);
             dxf.AddEntity(polyline8);
             dxf.AddEntity(polyline9);
             dxf.AddEntity(polyline10);
             dxf.AddEntity(polyline11);*/

            var line2 = new Line(a1, a48);
            var line3 = new Line(a2, a49);
            var line4 = new Line(a3, a50);
            var line5 = new Line(a4, a51);
            var line6 = new Line(a5, a52);
            var line7 = new Line(a6, a53);
            var line8 = new Line(a7, a54);
            var line9 = new Line(a8, a55);
            var line10 = new Line(a9, a56);
            var line11 = new Line(a10, a58);
            var line12 = new Line(a11, a59);
            var line13 = new Line(a12, a60);
            var line14 = new Line(a13, a61);
            var line15 = new Line(a14, a62);
            var line16 = new Line(a15, a63);
            var line17 = new Line(a16, a64);
            var line18 = new Line(a17, a65);
            var line19 = new Line(a18, a66);
            var line20 = new Line(a19, a67);
            var line21 = new Line(a22, a68);
            var line22 = new Line(a23, a69);
            var line23 = new Line(a24, a70);
            var line24 = new Line(a25, a57);
            var line25 = new Line(a26, a71);
            var line26 = new Line(a27, a72);
            var line27 = new Line(a28, a73);
            var line28 = new Line(a29, a74);
            var line29 = new Line(a30, a75);
            var line30 = new Line(a31, a76);
            var line31 = new Line(a32, a77);
            var line32 = new Line(a33, a78);
            var line33 = new Line(a34, a79);
            var line34 = new Line(a35, a80);
            var line35 = new Line(a36, a81);
            var line36 = new Line(a37, a82);
            var line37 = new Line(a38, a83);
            var line38 = new Line(a39, a84);
            var line39 = new Line(a40, a85);
            var line40 = new Line(a41, a86);
            var line41 = new Line(a42, a87);
            var line42 = new Line(a43, a88);
            var line43 = new Line(a44, a89);
            var line44 = new Line(a45, a90);
            var line45 = new Line(a46, a91);
            var line46 = new Line(a20, a92);
            var line47 = new Line(a115, a129);
            var line48 = new Line(a116, a130);
            var line49 = new Line(a117, a131);
            var line50 = new Line(a118, a132);
            var line51 = new Line(a119, a133);
            var line52 = new Line(a120, a134);
            var line53 = new Line(a121, a135);
            var line54 = new Line(a122, a136);
            var line55 = new Line(a123, a137);
            var line56 = new Line(a124, a138);
            var line57 = new Line(a125, a139);
            var line58 = new Line(a126, a140);
            var line59 = new Line(a127, a141);
            var line60 = new Line(v11, v11p);
            var line61 = new Line(a181, a144);
            var line62 = new Line(a182, a145);
            var line63 = new Line(a183, a146);
            var line64 = new Line(a184, a147);
            var line65 = new Line(a185, a148);
            var line66 = new Line(a186, a149);
            var line67 = new Line(a187, a150);
            var line68 = new Line(a188, a151);
            var line69 = new Line(a189, a152);
            var line70 = new Line(a190, a153);
            var line71 = new Line(a191, a154);
            var line72 = new Line(a192, a155);
            var line73 = new Line(a193, a156);
            var line74 = new Line(a194, a157);
            var line75 = new Line(v12, v12p);

            var arc5 = fun.DrawArc3(a47, a195, a196);
            var arc6 = fun.DrawArc3(a196, a197, a180);

            var line01 = Pus.Mirrorline(line1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line02 = Pus.Mirrorline(line2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line03 = Pus.Mirrorline(line3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line04 = Pus.Mirrorline(line4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line05 = Pus.Mirrorline(line5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line06 = Pus.Mirrorline(line6, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line07 = Pus.Mirrorline(line7, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line08 = Pus.Mirrorline(line8, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line09 = Pus.Mirrorline(line9, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line010 = Pus.Mirrorline(line10, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line011 = Pus.Mirrorline(line11, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line012 = Pus.Mirrorline(line12, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line013 = Pus.Mirrorline(line13, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line014 = Pus.Mirrorline(line14, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line015 = Pus.Mirrorline(line15, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line016 = Pus.Mirrorline(line16, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line017 = Pus.Mirrorline(line17, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line018 = Pus.Mirrorline(line18, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line019 = Pus.Mirrorline(line19, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line020 = Pus.Mirrorline(line20, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line021 = Pus.Mirrorline(line21, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line022 = Pus.Mirrorline(line22, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line023 = Pus.Mirrorline(line23, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line024 = Pus.Mirrorline(line24, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line025 = Pus.Mirrorline(line25, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line026 = Pus.Mirrorline(line26, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line027 = Pus.Mirrorline(line27, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line028 = Pus.Mirrorline(line28, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line029 = Pus.Mirrorline(line29, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line030 = Pus.Mirrorline(line30, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line031 = Pus.Mirrorline(line31, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line032 = Pus.Mirrorline(line32, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line033 = Pus.Mirrorline(line33, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line034 = Pus.Mirrorline(line34, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line035 = Pus.Mirrorline(line35, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line036 = Pus.Mirrorline(line36, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line037 = Pus.Mirrorline(line37, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line038 = Pus.Mirrorline(line38, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line039 = Pus.Mirrorline(line39, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line040 = Pus.Mirrorline(line40, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line041 = Pus.Mirrorline(line41, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line042 = Pus.Mirrorline(line42, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line043 = Pus.Mirrorline(line43, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line044 = Pus.Mirrorline(line44, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line045 = Pus.Mirrorline(line45, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line046 = Pus.Mirrorline(line46, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line047 = Pus.Mirrorline(line47, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line048 = Pus.Mirrorline(line48, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line049 = Pus.Mirrorline(line49, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line050 = Pus.Mirrorline(line50, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line051 = Pus.Mirrorline(line51, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line052 = Pus.Mirrorline(line52, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line053 = Pus.Mirrorline(line53, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line054 = Pus.Mirrorline(line54, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line055 = Pus.Mirrorline(line55, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line056 = Pus.Mirrorline(line56, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line057 = Pus.Mirrorline(line57, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line058 = Pus.Mirrorline(line58, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line059 = Pus.Mirrorline(line59, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line060 = Pus.Mirrorline(line60, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line061 = Pus.Mirrorline(line61, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line062 = Pus.Mirrorline(line62, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line063 = Pus.Mirrorline(line63, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line064 = Pus.Mirrorline(line64, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line065 = Pus.Mirrorline(line65, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line066 = Pus.Mirrorline(line66, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line067 = Pus.Mirrorline(line67, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line068 = Pus.Mirrorline(line68, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line069 = Pus.Mirrorline(line69, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line070 = Pus.Mirrorline(line70, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line071 = Pus.Mirrorline(line71, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line072 = Pus.Mirrorline(line72, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line073 = Pus.Mirrorline(line73, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line074 = Pus.Mirrorline(line74, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line075 = Pus.Mirrorline(line75, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline01 = Pus.MirrorPolyline(polyline1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline02 = Pus.MirrorPolyline(polyline2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline03 = Pus.MirrorPolyline(polyline3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline04 = Pus.MirrorPolyline(polyline4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline05 = Pus.MirrorPolyline(polyline5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline06 = Pus.MirrorPolyline(polyline6, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline07 = Pus.MirrorPolyline(polyline7, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline08 = Pus.MirrorPolyline(polyline8, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline09 = Pus.MirrorPolyline(polyline9, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline010 = Pus.MirrorPolyline(polyline10, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline011 = Pus.MirrorPolyline(polyline11, v1, fun.Polar(v1, 90 * pi / 180, 1));

            fun.drawBline(dxf, line01, 0.2, contour);
            fun.drawBline(dxf, line02, 0.2, contour);
            fun.drawBline(dxf, line03, 0.2, contour);
            fun.drawBline(dxf, line04, 0.2, contour);
            fun.drawBline(dxf, line05, 0.2, contour);
            fun.drawBline(dxf, line06, 0.2, contour);
            fun.drawBline(dxf, line07, 0.2, contour);
            fun.drawBline(dxf, line08, 0.2, contour);
            fun.drawBline(dxf, line09, 0.2, contour);
            fun.drawBline(dxf, line010, 0.2, contour);
            fun.drawBline(dxf, line011, 0.2, contour);
            fun.drawBline(dxf, line012, 0.2, contour);
            fun.drawBline(dxf, line013, 0.2, contour);
            fun.drawBline(dxf, line014, 0.2, contour);
            fun.drawBline(dxf, line015, 0.2, contour);
            fun.drawBline(dxf, line016, 0.2, contour);
            fun.drawBline(dxf, line017, 0.2, contour);
            fun.drawBline(dxf, line018, 0.2, contour);
            fun.drawBline(dxf, line019, 0.2, contour);
            fun.drawBline(dxf, line020, 0.2, contour);
            fun.drawBline(dxf, line021, 0.2, contour);
            fun.drawBline(dxf, line022, 0.2, contour);
            fun.drawBline(dxf, line023, 0.2, contour);
            fun.drawBline(dxf, line024, 0.2, contour);
            fun.drawBline(dxf, line025, 0.2, contour);
            fun.drawBline(dxf, line026, 0.2, contour);
            fun.drawBline(dxf, line027, 0.2, contour);
            fun.drawBline(dxf, line028, 0.2, contour);
            fun.drawBline(dxf, line029, 0.2, contour);
            fun.drawBline(dxf, line030, 0.2, contour);
            fun.drawBline(dxf, line031, 0.2, contour);
            fun.drawBline(dxf, line032, 0.2, contour);
            fun.drawBline(dxf, line033, 0.2, contour);
            fun.drawBline(dxf, line034, 0.2, contour);
            fun.drawBline(dxf, line035, 0.2, contour);
            fun.drawBline(dxf, line036, 0.2, contour);
            fun.drawBline(dxf, line037, 0.2, contour);
            fun.drawBline(dxf, line038, 0.2, contour);
            fun.drawBline(dxf, line039, 0.2, contour);
            fun.drawBline(dxf, line040, 0.2, contour);
            fun.drawBline(dxf, line041, 0.2, contour);
            fun.drawBline(dxf, line042, 0.2, contour);
            fun.drawBline(dxf, line043, 0.2, contour);
            fun.drawBline(dxf, line044, 0.2, contour);
            fun.drawBline(dxf, line045, 0.2, contour);
            fun.drawBline(dxf, line046, 0.2, contour);
            fun.drawBline(dxf, line047, 0.2, contour);
            fun.drawBline(dxf, line048, 0.2, contour);
            fun.drawBline(dxf, line049, 0.2, contour);
            fun.drawBline(dxf, line050, 0.2, contour);
            fun.drawBline(dxf, line051, 0.2, contour);
            fun.drawBline(dxf, line052, 0.2, contour);
            fun.drawBline(dxf, line053, 0.2, contour);
            fun.drawBline(dxf, line054, 0.2, contour);
            fun.drawBline(dxf, line055, 0.2, contour);
            fun.drawBline(dxf, line056, 0.2, contour);
            fun.drawBline(dxf, line057, 0.2, contour);
            fun.drawBline(dxf, line058, 0.2, contour);
            fun.drawBline(dxf, line059, 0.2, contour);
            fun.drawBline(dxf, line060, 0.2, contour);
            fun.drawBline(dxf, line061, 0.2, contour);
            fun.drawBline(dxf, line062, 0.2, contour);
            fun.drawBline(dxf, line063, 0.2, contour);
            fun.drawBline(dxf, line064, 0.2, contour);
            fun.drawBline(dxf, line065, 0.2, contour);
            fun.drawBline(dxf, line066, 0.2, contour);
            fun.drawBline(dxf, line067, 0.2, contour);
            fun.drawBline(dxf, line068, 0.2, contour);
            fun.drawBline(dxf, line069, 0.2, contour);
            fun.drawBline(dxf, line070, 0.2, contour);
            fun.drawBline(dxf, line071, 0.2, contour);
            fun.drawBline(dxf, line072, 0.2, contour);
            fun.drawBline(dxf, line073, 0.2, contour);
            fun.drawBline(dxf, line074, 0.2, contour);
            fun.drawBline(dxf, line075, 0.2, contour);
            fun.PolyFill(dxf, polyline01, 0.2, contour);
            fun.PolyFill(dxf, polyline02, 0.2, contour);
            fun.PolyFill(dxf, polyline03, 0.2, contour);
            fun.PolyFill(dxf, polyline04, 0.2, contour);
            fun.PolyFill(dxf, polyline05, 0.2, contour);
            fun.PolyFill(dxf, polyline06, 0.2, contour);
            fun.PolyFill(dxf, polyline07, 0.2, contour);
            fun.PolyFill(dxf, polyline08, 0.2, contour);
            fun.PolyFill(dxf, polyline09, 0.2, contour);
            fun.PolyFill(dxf, polyline010, 0.2, contour);
            fun.PolyFill(dxf, polyline011, 0.2, contour);

            var arc01 = fun.mirrorarc(arc1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc02 = fun.mirrorarc(arc2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc03 = fun.mirrorarc(arc3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc04 = fun.mirrorarc(arc4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc05 = fun.mirrorarc(arc5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc06 = fun.mirrorarc(arc6, v1, fun.Polar(v1, 90 * pi / 180, 1));


            fun.drawBArc(dxf, arc01, 0.2, contour);
            fun.drawBArc(dxf, arc02, 0.2, contour);
            fun.drawBArc(dxf, arc03, 0.2, contour);
            fun.drawBArc(dxf, arc04, 0.2, contour);
            //fun.drawBArc(dxf, arc05, 0.2, contour);
            //fun.drawBArc(dxf, arc06, 0.2, contour);


            //dxf.AddEntity(new EntityObject[] { line2, line3, line4, line5, line6, line7, line8, line9, line10, line11, line12, line13, line14, line15, line16, line17, line18, line19, line20, line21, line22, line23, line24, line25, line26, line27, line28, line29, line30, line31, line32, line33, line34, line35, line36, line37, line38, line39, line40, line41, line42, line43, line44, line45, line46 });
            //dxf.AddEntity(new EntityObject[] { line47, line48, line49, line50, line51, line52, line53, line54, line55, line56, line57, line58, line59, line60, line61, line62, line63, line64, line65, line66, line67, line68, line69, line70, line71, line72, line73, line74, line75 });
            //dxf.AddEntity(new EntityObject[] { arc5, arc6 });


            var z1 = fun.Polar(v1, 0, 16.58 / 51.69 * oal);
            var z2 = fun.Polar(v1, 0, 25.37 / 51.69 * oal);

            Line line00 = new Line(fun.Polar(v1, 0, 5), fun.Polar(v1, pi, oal + 5));
            line00.Layer = centre;
            line00.Lineweight = Lineweight.W25;
            line00.Linetype = Linetype.DashDot;
            dxf.AddEntity(line00);

            //标注

            var height = 2 * scale;//字体高度
            var offset = 10 * scale;//偏移量
            var arrowsize = 1 * scale;//箭头大小
            var exline = 1 * scale;//延伸线长度


            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-v12.X, v12.Y), 0, offset * 2, 0, height, arrowsize, exline, "OAL", "", "");
            fun.dimrot1(dxf, new Vector2(-z1.X, z1.Y), new Vector2(-v12.X, v12.Y), 0, offset * 1.5, 0, height, arrowsize, exline, "LPR", "", "");
            fun.dimrot1(dxf, new Vector2(-v11.X, v11.Y), new Vector2(-v12.X, v12.Y), 0, offset, 0, height, arrowsize, exline, "THL", "", "");
            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-z2.X, z2.Y), 0, offset, 0, height, arrowsize, exline, "LS", "", "");
            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-v6p.X, v6p.Y), 180, offset, 0, height, arrowsize, exline, "DRVL", "", "");
            fun.dimrot1(dxf, new Vector2(-a153.X, a153.Y), new Vector2(-a151.X, a151.Y), 180, offset * 0.8, 0, height, arrowsize, exline, "TP", "", "");
            fun.dimrot1(dxf, new Vector2(-a90.X, a90.Y), new Vector2(-v12p.X, v12p.Y), 180, offset * 0.8, 0, height, arrowsize, exline, "TCL", "", "");
            fun.dimrot1(dxf, new Vector2(-z1.X, z1.Y), new Vector2(-a90.X, a90.Y), 180, offset * 1.5, 0, height, arrowsize, exline, "LTA", "", "");
            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-a90.X, a90.Y), 180, offset * 2, 0, height, arrowsize, exline, "LF", "", "");
            fun.dimrot1(dxf, new Vector2(-v3.X, v3.Y), new Vector2(-v3p.X, v3p.Y), -90, offset * 0.8, 0, height, arrowsize, exline, "DCONMS", "", "");
            fun.dimrot1(dxf, new Vector2(-v12.X, v12.Y), new Vector2(-v12p.X, v12p.Y), 90, offset * 0.8, 0, height, arrowsize, exline, "TCPD", "", "");
            fun.dimrot1(dxf, new Vector2(-a163.X, a163.Y), new Vector2(-a106.X, a106.Y), 90, offset * 2.5, 0, height, arrowsize, exline, "TD", "", "");
            fun.jdbz2(dxf, new Line(new Vector2(-v0.X, v0.Y), new Vector2(-v1.X, v1.Y)), new Line(new Vector2(-a20.X, a20.Y), new Vector2(-a19.X, a19.Y)), offset * 1.5, height, arrowsize, exline, "FHA", "", "");
            fun.jt(dxf, new Vector2(-z1.X - 5, z1.Y - dconms / 2), -125, 16, height, "CCMS");
            fun.jt(dxf, new Vector2(-a145.X, a145.Y), -45, 10, height, "TDZ");
            fun.jt0(dxf, v1, -45, 15, height, "PCS");
            fun.jt0(dxf, new Vector2(-z1.X, z1.Y), -45, 15, height, "MCS");
            fun.jt0(dxf, new Vector2(-v12.X, z1.Y), 45, 15, height, "CLP");
            fun.jt(dxf, new Vector2(-v12.X - 30, a145.Y - 30), 0, 10, height, "FDP");
            fun.Axis(dxf, v1, 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, new Vector2(-z1.X + 50, z1.Y - 60), 0, -90, "Z", "X", "Y", 1.5, height, 0);
            fun.Axis(dxf, new Vector2(-z1.X, z1.Y), 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, new Vector2(-v12.X, z1.Y), 0, -90, "", "", "", 1, height, 0);

            Text text1 = new Text("A", new Vector2(-v12.X - 8, z1.Y + 1), height, 0);
            dxf.AddEntity(text1);

            var p1 = new Vector2(-v12.X, z1.Y);
            var p2 = fun.Polar(p1, 135 * pi / 180, 3);
            var p3 = fun.Polar(p1, 45 * pi / 180, 3);
            var p4 = fun.Polar(p1, -45 * pi / 180, 3);
            var p5 = fun.Polar(p1, -135 * pi / 180, 3);
            var p6 = new Vector2(-z1.X, z1.Y);
            var p7 = fun.Polar(p6, 90 * pi / 180, dconms * 1.5);
            var p8 = fun.Polar(p7, 60 * pi / 180, dconms / 2);
            var p9 = fun.Polar(p8, 0, dconms / 2);
            var p10 = fun.mirrorpoint(p7, v0, v1);
            var p11 = fun.mirrorpoint(p8, v0, v1);
            var p12 = fun.mirrorpoint(p9, v0, v1);
            var p14 = new Vector2(-v12.X - 80, z1.Y);
            var p15 = fun.Polar(p14, 90 * pi / 180, 19);
            var p16 = fun.Polar(p14, -90 * pi / 180, 19);
            var p17 = fun.Polar(p14, -90 * pi / 180, 12);
            var p18 = fun.Polar(p17, 2 * pi / 180, 4.9);
            var p19 = fun.Polar(p18, 11 * pi / 180, 11.6);
            var p20 = fun.Polar(p14, pi, 3);
            var p21 = fun.Polar(p14, 90 * pi / 180, 5.2);
            var p22 = fun.Polar(p14, -90 * pi / 180, 5.2);
            var p23 = fun.Polar(p14, pi, 6);
            var p24 = fun.Polar(p14, 0, 18);
            var p25 = fun.Polar(p14, 84 * pi / 180, 19.4);
            var p26 = fun.Polar(p14, 62 * pi / 180, 14.4);
            var p27 = fun.Polar(p14, 38 * pi / 180, 15.9);
            var p28 = fun.Polar(p14, 4 * pi / 180, 15.72);
            var p29 = fun.Polar(p14, 345 * pi / 180, 18.66);
            var p30 = fun.Polar(p14, 302 * pi / 180, 20.22);
            var p31 = fun.Polar(p14, 279 * pi / 180, 18.08);
            var p32 = fun.Polar(p14, 90 * pi / 180, 18.16);
            var p33 = fun.Polar(p16, -90 * pi / 180, 22);
            var p34 = fun.Polar(p16, -90 * pi / 180, 20);
            var p35 = fun.Polar(p34, 0, 25);
            var p36 = fun.Polar(p20, -90 * pi / 180, 52);
            var p37 = fun.Polar(p20, -90 * pi / 180, 50);
            var p38 = fun.Polar(p37, 5 * pi / 180, 13.5);


            var line76 = new Line(p15, p16);
            var line77 = new Line(p32, p25);
            var line78 = new Line(p21, p20);
            var line79 = new Line(p22, p20);
            var line80 = new Line(p17, p18);
            var line81 = new Line(p18, p19);
            var line82 = new Line(p23, p24);
            line82.Layer = centre;
            line82.Lineweight = Lineweight.W25;
            line82.Linetype = Linetype.DashDot;
            dxf.AddEntity(line82);


            fun.drawBline(dxf, line76, 0.2, contour);
            fun.drawBline(dxf, line77, 0.2, contour);
            fun.drawBline(dxf, line78, 0.2, contour);
            fun.drawBline(dxf, line79, 0.2, contour);
            fun.drawBline(dxf, line80, 0.2, contour);
            fun.drawBline(dxf, line81, 0.2, contour);


            LwPolyline linee1 = new LwPolyline();
            linee1.Vertexes.Add(new LwPolylineVertex(p2));
            linee1.Vertexes.Add(new LwPolylineVertex(p3));
            linee1.Vertexes.Add(new LwPolylineVertex(p4));
            linee1.Vertexes.Add(new LwPolylineVertex(p5));
            linee1.Vertexes.Add(new LwPolylineVertex(p2));
            linee1.Layer = refin;
            linee1.Lineweight = Lineweight.W35;
            linee1.Linetype = Linetype.Dashed;
            dxf.AddEntity(linee1);
            LwPolyline linee2 = new LwPolyline();
            linee2.Vertexes.Add(new LwPolylineVertex(p9));
            linee2.Vertexes.Add(new LwPolylineVertex(p8));
            linee2.Vertexes.Add(new LwPolylineVertex(p7));
            linee2.Vertexes.Add(new LwPolylineVertex(p10));
            linee2.Vertexes.Add(new LwPolylineVertex(p11));
            linee2.Vertexes.Add(new LwPolylineVertex(p12));
            linee2.Layer = refin;
            linee2.Lineweight = Lineweight.W35;
            linee2.Linetype = Linetype.Dashed;
            dxf.AddEntity(linee2);


            List<Vector3> points = new List<Vector3>
           {
                new Vector3(p15.X, p15.Y, 0),
                new Vector3(p25.X, p25.Y, 0),
                new Vector3(p26.X, p26.Y, 0),
                new Vector3(p27.X, p27.Y, 0),
                new Vector3(p28.X, p28.Y, 0),
                new Vector3(p29.X, p29.Y, 0),
                new Vector3(p19.X, p19.Y, 0),
                new Vector3(p30.X, p30.Y, 0),
                new Vector3(p31.X, p31.Y, 0),
                new Vector3(p16.X, p16.Y, 0),
            };

            Spline spline1 = new Spline(points);
            spline1.Layer = contour;
            spline1.Lineweight = Lineweight.W50;
            DxfDocument doc = new DxfDocument();
            dxf.AddEntity(spline1);


            fun.Axis(dxf, new Vector2(p14.X, p14.Y), 0, -90, "", "", "", 1, height, 0);

            fun.text(dxf, fun.Polar(p14, 102 * pi / 180, 27), height, "变体 A");

            Text text2 = new Text("变体 A", fun.Polar(p14, 102 * pi / 180, 27), height, 0);
            // dxf.AddEntity(text2);
            Text text3 = new Text("ISYC = 301-1", fun.Polar(fun.Polar(p14, 65 * pi / 180, 95), 0, 100), height * 2, 0);
            dxf.AddEntity(text3);

            var line83 = new Line(p16, p33);
            var line84 = new Line(p20, p36);
            dxf.AddEntity(line83);
            dxf.AddEntity(line84);
            fun.jt(dxf, p34, 0, 25, height, "");
            fun.jt(dxf, p37, 0, 25, height, "");



            Text text5 = new Text("THL", p35, height, 0);
            dxf.AddEntity(text5);
            Text text4 = new Text("OAL,LPR", p38, height, 0);
            dxf.AddEntity(text4);

            var td1 = 27.74;
            var thl1 = 49.06;

            var p39 = new Vector2(v10.X - 50, v1.Y);
            var p40 = fun.Polar(p39, 240 * pi / 180, 150);
            var p41 = fun.Polar(p40, 90 * pi / 180, 13.06 / 2);
            var p42 = fun.Polar(p41, 0, 24);
            var p43 = new Vector2(p40.X - 7.42 / 49.06 * thl1, p40.Y + 16.43 / 27.74 * td1);
            var p44 = new Vector2(p40.X - 9.37 / 49.06 * thl1, p40.Y + 14.69 / 27.74 * td1);
            var p45 = new Vector2(p40.X - 10.5 / 49.06 * thl1, p40.Y + 16.23 / 27.74 * td1);
            var p46 = new Vector2(p40.X - 11.31 / 49.06 * thl1, p40.Y + 14.67 / 27.74 * td1);
            var p47 = new Vector2(p40.X - 12.52 / 49.06 * thl1, p40.Y + 16.09 / 27.74 * td1);
            var p48 = new Vector2(p40.X - 13.21 / 49.06 * thl1, p40.Y + 14.48 / 27.74 * td1);
            var p49 = new Vector2(p40.X - 14.53 / 49.06 * thl1, p40.Y + 15.96 / 27.74 * td1);
            var p50 = new Vector2(p40.X - 15.25 / 49.06 * thl1, p40.Y + 14.35 / 27.74 * td1);
            var p51 = new Vector2(p40.X - 16.44 / 49.06 * thl1, p40.Y + 15.83 / 27.74 * td1);
            var p52 = new Vector2(p40.X - 17.36 / 49.06 * thl1, p40.Y + 14.16 / 27.74 * td1);
            var p53 = new Vector2(p40.X - 18.28 / 49.06 * thl1, p40.Y + 15.71 / 27.74 * td1);
            var p54 = new Vector2(p40.X - 19.47 / 49.06 * thl1, p40.Y + 13.95 / 27.74 * td1);
            var p55 = new Vector2(p40.X - 20.44 / 49.06 * thl1, p40.Y + 15.57 / 27.74 * td1);
            var p56 = new Vector2(p40.X - 21.24 / 49.06 * thl1, p40.Y + 13.95 / 27.74 * td1);
            var p57 = new Vector2(p40.X - 22.64 / 49.06 * thl1, p40.Y + 15.43 / 27.74 * td1);
            var p58 = new Vector2(p40.X - 23.18 / 49.06 * thl1, p40.Y + 13.95 / 27.74 * td1);
            var p59 = new Vector2(p40.X - 24.31 / 49.06 * thl1, p40.Y + 15.32 / 27.74 * td1);
            var p60 = new Vector2(p40.X - 25.29 / 49.06 * thl1, p40.Y + 13.56 / 27.74 * td1);
            var p61 = new Vector2(p40.X - 26.38 / 49.06 * thl1, p40.Y + 15.18 / 27.74 * td1);
            var p62 = new Vector2(p40.X - 27.29 / 49.06 * thl1, p40.Y + 13.5 / 27.74 * td1);
            var p63 = new Vector2(p40.X - 28.4 / 49.06 * thl1, p40.Y + 15.05 / 27.74 * td1);
            var p64 = new Vector2(p40.X - 29.4 / 49.06 * thl1, p40.Y + 13.39 / 27.74 * td1);
            var p65 = new Vector2(p40.X - 30.43 / 49.06 * thl1, p40.Y + 14.91 / 27.74 * td1);
            var p66 = new Vector2(p40.X - 31.41 / 49.06 * thl1, p40.Y + 13.22 / 27.74 * td1);
            var p67 = new Vector2(p40.X - 32.36 / 49.06 * thl1, p40.Y + 14.79 / 27.74 * td1);
            var p68 = new Vector2(p40.X - 33.16 / 49.06 * thl1, p40.Y + 13.19 / 27.74 * td1);
            var p69 = new Vector2(p40.X - 34.14 / 49.06 * thl1, p40.Y + 14.67 / 27.74 * td1);
            var p70 = new Vector2(p40.X - 35.08 / 49.06 * thl1, p40.Y + 12.99 / 27.74 * td1);
            var p71 = new Vector2(p40.X - 36.27 / 49.06 * thl1, p40.Y + 14.53 / 27.74 * td1);
            var p72 = new Vector2(p40.X - 37.13 / 49.06 * thl1, p40.Y + 12.84 / 27.74 * td1);
            var p73 = new Vector2(p40.X - 38.1 / 49.06 * thl1, p40.Y + 14.41 / 27.74 * td1);
            var p74 = new Vector2(p40.X - 39.18 / 49.06 * thl1, p40.Y + 12.49 / 27.74 * td1);
            var p75 = new Vector2(p40.X - 40.12 / 49.06 * thl1, p40.Y + 14.27 / 27.74 * td1);
            var p76 = new Vector2(p40.X - 41.03 / 49.06 * thl1, p40.Y + 12.29 / 27.74 * td1);
            var p77 = new Vector2(p40.X - 42.08 / 49.06 * thl1, p40.Y + 14.15 / 27.74 * td1);
            var p78 = new Vector2(p40.X - 43.17 / 49.06 * thl1, p40.Y + 12.21 / 27.74 * td1);
            var p79 = new Vector2(p40.X - 44.04 / 49.06 * thl1, p40.Y + 13.86 / 27.74 * td1);
            var p80 = new Vector2(p40.X - 45.23 / 49.06 * thl1, p40.Y + 12.03 / 27.74 * td1);
            var p81 = new Vector2(p40.X - 46.26 / 49.06 * thl1, p40.Y + 13.87 / 27.74 * td1);
            var p82 = new Vector2(p40.X - 47.1 / 49.06 * thl1, p40.Y + 11.84 / 27.74 * td1);
            var p83 = new Vector2(p40.X - 48.26 / 49.06 * thl1, p40.Y + 13.74 / 27.74 * td1);
            var p84 = new Vector2(p40.X - 49.4 / 49.06 * thl1, p40.Y + 11.84 / 27.74 * td1);
            var p85 = new Vector2(p40.X - 49.96 / 49.06 * thl1, p40.Y + 13.63 / 27.74 * td1);
            var p86 = new Vector2(p40.X - 50.69 / 49.06 * thl1, p40.Y + 13.58 / 27.74 * td1);
            var p87 = new Vector2(p40.X - 51.92 / 49.06 * thl1, p40.Y + 13.5 / 27.74 * td1);
            var p88 = new Vector2(p40.X - 56.48 / 49.06 * thl1, p40.Y + 13.2 / 27.74 * td1);
            var p89 = new Vector2(p40.X - 56.48 / 49.06 * thl1, p40.Y + 8.13 / 27.74 * td1);
            var p90 = new Vector2(p40.X - 51.72 / 49.06 * thl1, p40.Y + 10.4 / 27.74 * td1);
            var p91 = new Vector2(p40.X - 50.51 / 49.06 * thl1, p40.Y + 10.98 / 27.74 * td1);
            var p40p = fun.Polar(p40, pi, 60 / 49.06 * thl1);
            var p41p = fun.mirrorpoint(p41, p40, p40p);
            var p42p = fun.mirrorpoint(p42, p40, p40p);
            var p43p = fun.mirrorpoint(p43, p40, p40p);
            var p44p = fun.mirrorpoint(p44, p40, p40p);
            var p45p = fun.mirrorpoint(p45, p40, p40p);
            var p46p = fun.mirrorpoint(p46, p40, p40p);
            var p47p = fun.mirrorpoint(p47, p40, p40p);
            var p48p = fun.mirrorpoint(p48, p40, p40p);
            var p49p = fun.mirrorpoint(p49, p40, p40p);
            var p50p = fun.mirrorpoint(p50, p40, p40p);
            var p51p = fun.mirrorpoint(p51, p40, p40p);
            var p52p = fun.mirrorpoint(p52, p40, p40p);
            var p53p = fun.mirrorpoint(p53, p40, p40p);
            var p54p = fun.mirrorpoint(p54, p40, p40p);
            var p55p = fun.mirrorpoint(p55, p40, p40p);
            var p56p = fun.mirrorpoint(p56, p40, p40p);
            var p57p = fun.mirrorpoint(p57, p40, p40p);
            var p58p = fun.mirrorpoint(p58, p40, p40p);
            var p59p = fun.mirrorpoint(p59, p40, p40p);
            var p60p = fun.mirrorpoint(p60, p40, p40p);
            var p61p = fun.mirrorpoint(p61, p40, p40p);
            var p62p = fun.mirrorpoint(p62, p40, p40p);
            var p63p = fun.mirrorpoint(p63, p40, p40p);
            var p64p = fun.mirrorpoint(p64, p40, p40p);
            var p65p = fun.mirrorpoint(p65, p40, p40p);
            var p66p = fun.mirrorpoint(p66, p40, p40p);
            var p67p = fun.mirrorpoint(p67, p40, p40p);
            var p68p = fun.mirrorpoint(p68, p40, p40p);
            var p69p = fun.mirrorpoint(p69, p40, p40p);
            var p70p = fun.mirrorpoint(p70, p40, p40p);
            var p71p = fun.mirrorpoint(p71, p40, p40p);
            var p72p = fun.mirrorpoint(p72, p40, p40p);
            var p73p = fun.mirrorpoint(p73, p40, p40p);
            var p74p = fun.mirrorpoint(p74, p40, p40p);
            var p75p = fun.mirrorpoint(p75, p40, p40p);
            var p76p = fun.mirrorpoint(p76, p40, p40p);
            var p77p = fun.mirrorpoint(p77, p40, p40p);
            var p78p = fun.mirrorpoint(p78, p40, p40p);
            var p79p = fun.mirrorpoint(p79, p40, p40p);
            var p80p = fun.mirrorpoint(p80, p40, p40p);
            var p81p = fun.mirrorpoint(p81, p40, p40p);
            var p82p = fun.mirrorpoint(p82, p40, p40p);
            var p83p = fun.mirrorpoint(p83, p40, p40p);
            var p84p = fun.mirrorpoint(p84, p40, p40p);
            var p85p = fun.mirrorpoint(p85, p40, p40p);
            var p86p = fun.mirrorpoint(p86, p40, p40p);
            var p87p = fun.mirrorpoint(p87, p40, p40p);
            var p88p = fun.mirrorpoint(p88, p40, p40p);
            var p92 = fun.Inters(p54, fun.Polar(p54, 217 * pi / 180, 1), p56, p56p);
            var p93 = fun.Inters(p92, fun.Polar(p92, 227 * pi / 180, 1), p58, p58p);
            var p94 = fun.Inters(p93, fun.Polar(p93, 210 * pi / 180, 1), p60, p60p);
            var p95 = fun.Inters(p94, fun.Polar(p94, 210 * pi / 180, 1), p62, p62p);
            var p96 = fun.Inters(p95, fun.Polar(p95, 201 * pi / 180, 1), p64, p64p);
            var p97 = fun.Inters(p96, fun.Polar(p96, 201 * pi / 180, 1), p66, p66p);
            var p98 = fun.Inters(p97, fun.Polar(p97, 201 * pi / 180, 1), p68, p68p);
            var p99 = fun.Inters(p98, fun.Polar(p98, 214 * pi / 180, 1), p70, p70p);
            var p100 = fun.Inters(p99, fun.Polar(p99, 210 * pi / 180, 1), p72, p72p);
            var p101 = fun.Inters(p100, fun.Polar(p100, 205 * pi / 180, 1), p74, p74p);
            var p102 = fun.Inters(p101, fun.Polar(p101, 210 * pi / 180, 1), p76, p76p);
            var p103 = fun.Inters(p102, fun.Polar(p102, 210 * pi / 180, 1), p78, p78p);
            var p104 = fun.Inters(p40, p40p, p80, p80p);
            var p105 = fun.Inters(p104, fun.Polar(p104, 208 * pi / 180, 1), p82, p82p);
            var p106 = fun.Inters(p105, fun.Polar(p105, 202 * pi / 180, 1), p84, p84p);
            var p107 = fun.Inters(p106, fun.Polar(p106, 224 * pi / 180, 1), p86, p86p);
            var p108 = fun.Inters(p107, fun.Polar(p107, 210 * pi / 180, 1), p87, p87p);
            var p109 = fun.Inters(p108, fun.Polar(p108, 188 * pi / 180, 1), p88, p88p);
            var p110 = new Vector2(p43.X, p40.Y + 3.1 / 27.74 * td1);
            var p111 = fun.Inters(p110, fun.Polar(p110, 135 * pi / 180, 1), p44, p44p);
            var p112 = fun.Inters(p111, fun.Polar(p111, 207 * pi / 180, 1), p46, p46p);
            var p113 = fun.Inters(p112, fun.Polar(p112, 200 * pi / 180, 1), p48, p48p);
            var p114 = fun.Inters(p113, fun.Polar(p113, 200 * pi / 180, 1), p50, p50p);
            var p115 = fun.Inters(p114, fun.Polar(p114, 205 * pi / 180, 1), p52, p52p);
            var p116 = fun.Inters(p115, fun.Polar(p115, 198 * pi / 180, 1), p54, p54p);
            var p117 = fun.Inters(p40, p40p, p56, p56p);
            var p118 = fun.Inters(p117, fun.Polar(p117, 206 * pi / 180, 1), p58, p58p);
            var p119 = fun.Inters(p118, fun.Polar(p118, 213 * pi / 180, 1), p60, p60p);
            var p120 = fun.Inters(p119, fun.Polar(p119, 199 * pi / 180, 1), p62, p62p);
            var p121 = fun.Inters(p120, fun.Polar(p120, 215 * pi / 180, 1), p64, p64p);
            var p122 = fun.Inters(p121, fun.Polar(p121, 187 * pi / 180, 1), p66, p66p);
            var p123 = fun.Inters(p122, fun.Polar(p122, 213 * pi / 180, 1), p68, p68p);
            var p124 = fun.Inters(p123, fun.Polar(p123, 219 * pi / 180, 1), p70, p70p);
            var p125 = fun.Inters(p124, fun.Polar(p124, 180 * pi / 180, 1), p72, p72p);
            var p126 = fun.Inters(p125, fun.Polar(p125, 224 * pi / 180, 1), p74, p74p);
            var p127 = fun.Inters(p126, fun.Polar(p126, 209 * pi / 180, 1), p76, p76p);
            var p128 = fun.Inters(p127, fun.Polar(p127, 204 * pi / 180, 1), p78, p78p);
            var p129 = fun.Inters(p128, fun.Polar(p128, 181 * pi / 180, 1), p80, p80p);
            var p130 = new Vector2(p43.X, p40.Y - 5.66 / 27.74 * td1);
            var p131 = fun.Inters(p130, fun.Polar(p130, 196 * pi / 180, 1), p44, p44p);
            var p132 = fun.Inters(p131, fun.Polar(p131, 200 * pi / 180, 1), p46, p46p);
            var p133 = fun.Inters(p132, fun.Polar(p132, 200 * pi / 180, 1), p48, p48p);
            var p134 = fun.Inters(p133, fun.Polar(p133, 211 * pi / 180, 1), p50, p50p);
            var p135 = fun.Inters(p134, fun.Polar(p134, 203 * pi / 180, 1), p52, p52p);
            var p136 = fun.Inters(p135, fun.Polar(p135, 197 * pi / 180, 1), p54, p54p);
            var p137 = fun.Inters(p136, fun.Polar(p136, 197 * pi / 180, 1), p56, p56p);
            var p138 = fun.Inters(p137, fun.Polar(p137, 210 * pi / 180, 1), p58, p58p);
            var p139 = fun.Inters(p138, fun.Polar(p138, 191 * pi / 180, 1), p60, p60p);
            var p140 = p62p;
            var p141 = new Vector2(p40.X - 100, p40.Y + 40);
            var p142 = new Vector2(p40.X + 70, p40.Y + 40);
            var p143 = new Vector2(p40.X + 70, p40.Y - 60);
            var p144 = new Vector2(p40.X - 100, p40.Y - 60);
            var p145 = fun.Polar(p81p, -90 * pi / 180, 25);
            var p146 = fun.Polar(p81p, -90 * pi / 180, 35);
            var p147 = fun.Polar(p81p, -90 * pi / 180, 37);
            var p148 = fun.Polar(p85, fun.CalAngle(p85, p43), fun.CalDistance(p85, p43) * 2);
            var p149 = fun.Polar(p85, fun.CalAngle(p85, p43), fun.CalDistance(p85, p43) * 1.5);


            var polyline12 = Pus.AddPointsToLwPolyLine(p42, p41, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85, p88, p88p, p85p, p84p, p83p, p82p, p81p, p80p, p79p, p78p, p77p, p76p, p75p, p74p, p73p, p72p, p71p, p70p, p69p, p68p, p67p, p66p, p65p, p64p, p63p, p62p, p61p, p60p, p59p, p58p, p57p, p56p, p55p, p54p, p53p, p52p, p51p, p50p, p49p, p48p, p47p, p46p, p45p, p44p, p43p, p41p, p42p); ;
            var polyline13 = Pus.AddPointsToLwPolyLine(p84, p91, p90, p89, p109, p108, p107, p106, p105, p104, p103, p102, p101, p100, p99, p98, p97, p96, p95, p94, p93, p92, p54);
            var polyline14 = Pus.AddPointsToLwPolyLine(p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125, p126, p127, p128, p129, p82p);
            var polyline15 = Pus.AddPointsToLwPolyLine(p130, p131, p132, p133, p134, p135, p136, p137, p138, p139, p140);
            //dxf.AddEntity(polyline12);
            //dxf.AddEntity(polyline13);
            //dxf.AddEntity(polyline14);
            //dxf.AddEntity(polyline15);

            fun.PolyFill(dxf, polyline12, 0.2, contour);
            fun.PolyFill(dxf, polyline13, 0.2, contour);
            fun.PolyFill(dxf, polyline14, 0.2, contour);
            fun.PolyFill(dxf, polyline15, 0.2, contour);


            var line85 = new Line(p87, p90);
            var line86 = new Line(p86, p91);
            var line87 = new Line(p108, p87p);
            var line88 = new Line(p107, p86p);
            var line89 = new Line(p106, p84p);
            var line90 = new Line(p105, p82p);
            var line91 = new Line(p104, p129);
            var line92 = new Line(p103, p128);
            var line93 = new Line(p102, p127);
            var line94 = new Line(p101, p126);
            var line95 = new Line(p100, p125);
            var line96 = new Line(p99, p124);
            var line97 = new Line(p98, p123);
            var line98 = new Line(p97, p122);
            var line99 = new Line(p96, p121);
            var line100 = new Line(p95, p120);
            var line101 = new Line(p94, p119);
            var line102 = new Line(p93, p118);
            var line103 = new Line(p92, p117);
            var line104 = new Line(p54, p116);
            var line105 = new Line(p52, p115);
            var line106 = new Line(p50, p114);
            var line107 = new Line(p48, p113);
            var line108 = new Line(p46, p112);
            var line109 = new Line(p44, p111);
            var line110 = new Line(p43, p43p);
            var line111 = new Line(p131, p44p);
            var line112 = new Line(p132, p46p);
            var line113 = new Line(p133, p48p);
            var line114 = new Line(p134, p50p);
            var line115 = new Line(p135, p52p);
            var line116 = new Line(p136, p54p);
            var line117 = new Line(p137, p56p);
            var line118 = new Line(p138, p58p);
            var line119 = new Line(p139, p60p);
            var line120 = new Line(p41, p41p);

            fun.drawBline(dxf, line85, 0.2, contour);
            fun.drawBline(dxf, line86, 0.2, contour);
            fun.drawBline(dxf, line87, 0.2, contour);
            fun.drawBline(dxf, line88, 0.2, contour);
            fun.drawBline(dxf, line89, 0.2, contour);
            fun.drawBline(dxf, line90, 0.2, contour);
            fun.drawBline(dxf, line91, 0.2, contour);
            fun.drawBline(dxf, line92, 0.2, contour);
            fun.drawBline(dxf, line93, 0.2, contour);
            fun.drawBline(dxf, line94, 0.2, contour);
            fun.drawBline(dxf, line95, 0.2, contour);
            fun.drawBline(dxf, line96, 0.2, contour);
            fun.drawBline(dxf, line97, 0.2, contour);
            fun.drawBline(dxf, line98, 0.2, contour);
            fun.drawBline(dxf, line99, 0.2, contour);
            fun.drawBline(dxf, line100, 0.2, contour);
            fun.drawBline(dxf, line101, 0.2, contour);
            fun.drawBline(dxf, line102, 0.2, contour);
            fun.drawBline(dxf, line103, 0.2, contour);
            fun.drawBline(dxf, line104, 0.2, contour);
            fun.drawBline(dxf, line105, 0.2, contour);
            fun.drawBline(dxf, line106, 0.2, contour);
            fun.drawBline(dxf, line107, 0.2, contour);
            fun.drawBline(dxf, line108, 0.2, contour);
            fun.drawBline(dxf, line109, 0.2, contour);
            fun.drawBline(dxf, line110, 0.2, contour);
            fun.drawBline(dxf, line111, 0.2, contour);
            fun.drawBline(dxf, line112, 0.2, contour);
            fun.drawBline(dxf, line113, 0.2, contour);
            fun.drawBline(dxf, line114, 0.2, contour);
            fun.drawBline(dxf, line115, 0.2, contour);
            fun.drawBline(dxf, line116, 0.2, contour);
            fun.drawBline(dxf, line117, 0.2, contour);
            fun.drawBline(dxf, line118, 0.2, contour);
            fun.drawBline(dxf, line119, 0.2, contour);
            fun.drawBline(dxf, line120, 0.2, contour);


            //dxf.AddEntity(new EntityObject[] { line85, line86, line87, line88, line89, line90, line91, line92, line93, line94, line95, line96, line97, line98, line99, line100, line101, line102, line103, line104, line105, line106, line107, line108, line109, line110, line111, line112, line113, line114, line115, line116, line117, line118, line119 });


            Line line121 = new Line(p40p, fun.Polar(p40, 0, 41));
            line121.Layer = centre;
            line121.Lineweight = Lineweight.W25;
            line121.Linetype = Linetype.DashDot;
            dxf.AddEntity(line121);


            LwPolyline Arc00 = new LwPolyline();
            Arc00.Vertexes.Add(new LwPolylineVertex(p110));
            Arc00.Vertexes.Add(new LwPolylineVertex(p40));
            Arc00.Vertexes.Add(new LwPolylineVertex(p130));
            Arc00.Vertexes[0].Bulge = Math.Tan(-53 * pi / 180 / 4);
            Arc00.Vertexes[1].Bulge = Math.Tan(-56 * pi / 180 / 4);
            fun.PolyFill(dxf, Arc00, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(p42));
            Arc1.Vertexes.Add(new LwPolylineVertex(new Vector2(p42.X, p40.Y)));
            Arc1.Vertexes.Add(new LwPolylineVertex(p42p));
            Arc1.Vertexes[0].Bulge = Math.Tan(-60 * pi / 180 / 4);
            Arc1.Vertexes[1].Bulge = Math.Tan(60 * pi / 180 / 4);
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(p141));
            Arc2.Vertexes.Add(new LwPolylineVertex(p142));
            Arc2.Vertexes.Add(new LwPolylineVertex(p143));
            Arc2.Vertexes.Add(new LwPolylineVertex(p144));
            Arc2.Vertexes.Add(new LwPolylineVertex(p141));
            Arc2.Layer = refin;
            Arc2.Lineweight = Lineweight.W35;
            Arc2.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc2);


            fun.Axis(dxf, new Vector2(p88.X, p40.Y), 0, -90, "", "", "", 1, height, 0);

            fun.dimrot1(dxf, p88, p88p, 90, offset * 0.5, 0, height, arrowsize, exline, "TCPD", "", "");
            fun.dimrot1(dxf, p81, p81p, 90, offset * 1.5, 0, height, arrowsize, exline, "TD", "", "");
            fun.dimrot1(dxf, p88p, p81p, 180, offset * 0.8, 0, height, arrowsize, exline, "TCL", "", "");

            var line122 = new Line(p81p, p147);
            dxf.AddEntity(line122);
            var line123 = new Line(p85, p148);
            dxf.AddEntity(line123);

            fun.jt(dxf, p145, 0, 20, 2, "");
            fun.jt(dxf, p146, 0, 20, 2, "");



            Text text6 = new Text("LF", fun.Polar(p145, 5 * pi / 180, 12), height, 0);
            dxf.AddEntity(text6);
            Text text7 = new Text("LTA", fun.Polar(p146, 5 * pi / 180, 12), height, 0);
            dxf.AddEntity(text7);

            fun.jt(dxf, p149, 160, 25, height, "TG");
            fun.jt0(dxf, new Vector2(p88.X, p40.Y), 105, 23, height, "CIP");
            fun.jt0(dxf, p81p, 315, 9, height, "CRP");

            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
       
        public static void Standard16460_101(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            var scale = 2;
            var oal = 47.0 * scale;//总长
            var dconms = 8 * scale;//柄径
            var l3 = 19 * scale;//柄部长度
            var drvl = 5 * scale;
            var thl = 15.25 * scale;
            var td = 6 * scale;
            var tcpd = 5.13 * scale;
            //柄部

            var v1 = new Vector2(0, 0);
            var v0 = fun.Polar(v1, 0, oal);
            var v2 = fun.Polar(v1, 90 * pi / 180, dconms / 2);
            var v3 = fun.Polar(v2, 0, 0.8 / 3.31 * dconms / 2);
            var v8 = fun.Polar(v2, -90 * pi / 180, 1.48 / 3.31 * dconms / 2);
            var v9 = fun.Polar(v8, 0, drvl);
            var v6 = fun.Polar(v2, 0, fun.CalDistance(v8, v9));
            var v5 = fun.Polar(v6, pi, fun.CalDistance(v3, v2));
            var v4 = fun.mirrorpoint(v3, v8, v9);
            var v7 = fun.mirrorpoint(v5, v8, v9);
            var v10 = fun.Polar(v2, 0, l3);
            var v3p = fun.mirrorpoint(v3, v0, v1);
            var v4p = fun.mirrorpoint(v4, v0, v1);
            var v5p = fun.mirrorpoint(v5, v0, v1);
            var v6p = fun.mirrorpoint(v6, v0, v1);
            var v7p = fun.mirrorpoint(v7, v0, v1);
            var v8p = fun.mirrorpoint(v8, v0, v1);
            var v9p = fun.mirrorpoint(v9, v0, v1);
            var v10p = fun.mirrorpoint(v10, v0, v1);

            var r11 = new Vector2(v10.X + 10 / 38.0 * l3, v10.Y - dconms / 4);
            var r11p = fun.mirrorpoint(r11, v0, v1);
            var r12 = fun.Polar(r11, 0, 14);
            var r12p = fun.mirrorpoint(r12, v0, v1);

            var arc1 = fun.DrawArc3(v3, v8, v4);
            var arc2 = fun.DrawArc3(v7, v9, v5);
            var arc3 = fun.DrawArc3(v4p, v8p, v3p);
            var arc4 = fun.DrawArc3(v5p, v9p, v7p);
            var line1 = new Line(v8, v8p);
            var polyline1 = Pus.AddPointsToLwPolyLine(v7, v4, v4p, v7p, v7);
            var polyline2 = Pus.AddPointsToLwPolyLine(v3, v5, v6);
            var polyline3 = Pus.AddPointsToLwPolyLine(v3p, v5p, v6p);
            var polyline4 = Pus.AddPointsToLwPolyLine(v6, v6p, v10p, r11p, r11, v10, v6);

            //dxf.AddEntity(new EntityObject[] { arc1, arc2, arc3, arc4, line1, polyline1, polyline2, polyline3, polyline4 });



            //刀头

            var v11 = new Vector2(v0.X - thl, v0.Y + tcpd / 2);
            var v12 = new Vector2(v0.X, v11.Y);
            var v11p = fun.mirrorpoint(v11, v0, v1);
            var v12p = fun.mirrorpoint(v12, v0, v1);

            var polyline5 = Pus.AddPointsToLwPolyLine(v11p,r12p, r11p, r11, r12,v11);
            //dxf.AddEntity(polyline5);

            var l1 = new Line(v10, v10p);
            var l2 = new Line(r12, r12p);
            var l4 = Pus.Mirrorline(l1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var l5 = Pus.Mirrorline(l2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            fun.drawBline(dxf, l4, 0.2, contour); 
            fun.drawBline(dxf, l5, 0.2, contour);

            var a1 = new Vector2(v11.X + 0.33 / 30.48 * thl, v11.Y + 0.8 / 12.75 * td);
            var a2 = new Vector2(v11.X + 0.93 / 30.48 * thl, v11.Y);
            var a3 = new Vector2(v11.X + 1.58 / 30.48 * thl, v11.Y + 0.71 / 12.75 * td);
            var a4 = new Vector2(v11.X + 2.09 / 30.48 * thl, v11.Y - 0.05 / 12.75 * td);
            var a5 = new Vector2(v11.X + 2.78 / 30.48 * thl, v11.Y + 0.66 / 12.75 * td);
            var a6 = new Vector2(v11.X + 3.36 / 30.48 * thl, v11.Y - 0.15 / 12.75 * td);
            var a7 = new Vector2(v11.X + 4.1 / 30.48 * thl, v11.Y + 0.39 / 12.75 * td);
            var a8 = new Vector2(v11.X + 4.73 / 30.48 * thl, v11.Y - 0.34 / 12.75 * td);
            var a9 = new Vector2(v11.X + 5.36 / 30.48 * thl, v11.Y + 0.2 / 12.75 * td);
            var a10 = new Vector2(v11.X + 5.99 / 30.48 * thl, v11.Y - 0.52 / 12.75 * td);
            var a11 = new Vector2(v11.X + 6.61 / 30.48 * thl, v11.Y + 0.2 / 12.75 * td);
            var a12 = new Vector2(v11.X + 7.24 / 30.48 * thl, v11.Y - 0.72 / 12.75 * td);
            var a13 = new Vector2(v11.X + 7.78 / 30.48 * thl, v11.Y - 0.25 / 12.75 * td);
            var a14 = new Vector2(v11.X + 8.42 / 30.48 * thl, v11.Y - 0.99 / 12.75 * td);
            var a15 = new Vector2(v11.X + 9.05 / 30.48 * thl, v11.Y - 0.57 / 12.75 * td);
            var a16 = new Vector2(v11.X + 9.69 / 30.48 * thl, v11.Y - 1.3 / 12.75 * td);
            var a17 = new Vector2(v11.X + 10.26 / 30.48 * thl, v11.Y - 0.82 / 12.75 * td);
            var a18 = new Vector2(v11.X + 11 / 30.48 * thl, v11.Y - 1.57 / 12.75 * td);
            var a19 = new Vector2(v11.X + 11.78 / 30.48 * thl, v11.Y - 1.22 / 12.75 * td);
            var a20 = new Vector2(v11.X + 27.58 / 30.48 * thl, v11.Y - 6.72 / 12.75 * td);
            var a21 = new Vector2(v12.X, v12.Y - 6.91 / 12.75 * td);
            var a22 = fun.Inters(a19, a20, new Vector2(v11.X + 12.47, v11.Y), new Vector2(v11.X + 12.47, v11.Y - 1));
            var a23 = fun.Inters(a19, a20, new Vector2(v11.X + 13.06, v11.Y), new Vector2(v11.X + 13.06, v11.Y - 1));
            var a24 = fun.Inters(a19, a20, new Vector2(v11.X + 13.68, v11.Y), new Vector2(v11.X + 13.68, v11.Y - 1));
            var a25 = fun.Inters(a19, a20, new Vector2(v11.X + 14.37, v11.Y), new Vector2(v11.X + 14.37, v11.Y - 1));
            var a26 = fun.Inters(a19, a20, new Vector2(v11.X + 14.91, v11.Y), new Vector2(v11.X + 14.91, v11.Y - 1));
            var a27 = fun.Inters(a19, a20, new Vector2(v11.X + 15.53, v11.Y), new Vector2(v11.X + 15.53, v11.Y - 1));
            var a28 = fun.Inters(a19, a20, new Vector2(v11.X + 16.13, v11.Y), new Vector2(v11.X + 16.13, v11.Y - 1));
            var a29 = fun.Inters(a19, a20, new Vector2(v11.X + 16.71, v11.Y), new Vector2(v11.X + 16.71, v11.Y - 1));
            var a30 = fun.Inters(a19, a20, new Vector2(v11.X + 17.38, v11.Y), new Vector2(v11.X + 17.38, v11.Y - 1));
            var a31 = fun.Inters(a19, a20, new Vector2(v11.X + 17.87, v11.Y), new Vector2(v11.X + 17.87, v11.Y - 1));
            var a32 = fun.Inters(a19, a20, new Vector2(v11.X + 18.64, v11.Y), new Vector2(v11.X + 18.64, v11.Y - 1));
            var a33 = fun.Inters(a19, a20, new Vector2(v11.X + 19.24, v11.Y), new Vector2(v11.X + 19.24, v11.Y - 1));
            var a34 = fun.Inters(a19, a20, new Vector2(v11.X + 19.81, v11.Y), new Vector2(v11.X + 19.81, v11.Y - 1));
            var a35 = fun.Inters(a19, a20, new Vector2(v11.X + 20.44, v11.Y), new Vector2(v11.X + 20.44, v11.Y - 1));
            var a36 = fun.Inters(a19, a20, new Vector2(v11.X + 21.11, v11.Y), new Vector2(v11.X + 21.11, v11.Y - 1));
            var a37 = fun.Inters(a19, a20, new Vector2(v11.X + 21.83, v11.Y), new Vector2(v11.X + 21.83, v11.Y - 1));
            var a38 = fun.Inters(a19, a20, new Vector2(v11.X + 22.31, v11.Y), new Vector2(v11.X + 22.31, v11.Y - 1));
            var a39 = fun.Inters(a19, a20, new Vector2(v11.X + 23.04, v11.Y), new Vector2(v11.X + 23.04, v11.Y - 1));
            var a40 = fun.Inters(a19, a20, new Vector2(v11.X + 23.64, v11.Y), new Vector2(v11.X + 23.64, v11.Y - 1));
            var a41 = fun.Inters(a19, a20, new Vector2(v11.X + 24.31, v11.Y), new Vector2(v11.X + 24.31, v11.Y - 1));
            var a42 = fun.Inters(a19, a20, new Vector2(v11.X + 24.95, v11.Y), new Vector2(v11.X + 24.95, v11.Y - 1));
            var a43 = fun.Inters(a19, a20, new Vector2(v11.X + 25.53, v11.Y), new Vector2(v11.X + 25.53, v11.Y - 1));
            var a44 = fun.Inters(a19, a20, new Vector2(v11.X + 26.28, v11.Y), new Vector2(v11.X + 26.28, v11.Y - 1));
            var a45 = fun.Inters(a19, a20, new Vector2(v11.X + 26.65, v11.Y), new Vector2(v11.X + 26.65, v11.Y - 1));
            var a46 = fun.Inters(a19, a20, new Vector2(v11.X + 27.17, v11.Y), new Vector2(v11.X + 27.17, v11.Y - 1));
            var a47 = fun.Polar(v11, -90 * pi / 180, 3.43 / 12.75 * td);
            var a48 = fun.Inters(a47, fun.Polar(a47, 36 * pi / 180, 1), a1, fun.Polar(a1, 267 * pi / 180, 1));
            var a49 = fun.Inters(a48, fun.Polar(a48, 307 * pi / 180, 1), a2, fun.Polar(a2, 267 * pi / 180, 1));
            var a50 = fun.Inters(a49, fun.Polar(a49, 31 * pi / 180, 1), a3, fun.Polar(a3, 267 * pi / 180, 1));
            var a51 = fun.Inters(a50, fun.Polar(a50, 301 * pi / 180, 1), a4, fun.Polar(a4, 267 * pi / 180, 1));
            var a52 = fun.Inters(a51, fun.Polar(a51, 31 * pi / 180, 1), a5, fun.Polar(a5, 267 * pi / 180, 1));
            var a53 = fun.Inters(a52, fun.Polar(a52, 301 * pi / 180, 1), a6, fun.Polar(a6, 267 * pi / 180, 1));
            var a54 = fun.Inters(a53, fun.Polar(a53, 31 * pi / 180, 1), a7, fun.Polar(a7, 267 * pi / 180, 1));
            var a55 = fun.Inters(a54, fun.Polar(a54, 324 * pi / 180, 1), a8, fun.Polar(a8, 267 * pi / 180, 1));
            var a56 = fun.Inters(a55, fun.Polar(a55, 10 * pi / 180, 1), a9, fun.Polar(a9, 267 * pi / 180, 1));
            var a57 = fun.Inters(a56, fun.Polar(a56, 339 * pi / 180, 1), a25, fun.Polar(a25, 267 * pi / 180, 1));
            var a58 = fun.Inters(a56, a57, a10, fun.Polar(a10, 267 * pi / 180, 1));
            var a59 = fun.Inters(a56, a57, a11, fun.Polar(a11, 267 * pi / 180, 1));
            var a60 = fun.Inters(a56, a57, a12, fun.Polar(a12, 267 * pi / 180, 1));
            var a61 = fun.Inters(a56, a57, a13, fun.Polar(a13, 267 * pi / 180, 1));
            var a62 = fun.Inters(a56, a57, a14, fun.Polar(a14, 267 * pi / 180, 1));
            var a63 = fun.Inters(a56, a57, a15, fun.Polar(a15, 267 * pi / 180, 1));
            var a64 = fun.Inters(a56, a57, a16, fun.Polar(a16, 267 * pi / 180, 1));
            var a65 = fun.Inters(a56, a57, a17, fun.Polar(a17, 267 * pi / 180, 1));
            var a66 = fun.Inters(a56, a57, a18, fun.Polar(a18, 267 * pi / 180, 1));
            var a67 = fun.Inters(a56, a57, a19, fun.Polar(a19, 267 * pi / 180, 1));
            var a68 = fun.Inters(a56, a57, a22, fun.Polar(a22, 267 * pi / 180, 1));
            var a69 = fun.Inters(a56, a57, a23, fun.Polar(a23, 267 * pi / 180, 1));
            var a70 = fun.Inters(a56, a57, a24, fun.Polar(a24, 267 * pi / 180, 1));
            var a71 = fun.Inters(a70, fun.Polar(a70, 2 * pi / 180, 1), a26, fun.Polar(a26, 267 * pi / 180, 1));
            var a72 = fun.Inters(a71, fun.Polar(a71, 321 * pi / 180, 1), a27, fun.Polar(a27, 267 * pi / 180, 1));
            var a73 = fun.Inters(a72, fun.Polar(a72, 14 * pi / 180, 1), a28, fun.Polar(a28, 267 * pi / 180, 1));
            var a74 = fun.Inters(a73, fun.Polar(a73, 319 * pi / 180, 1), a29, fun.Polar(a29, 267 * pi / 180, 1));
            var a75 = fun.Inters(a74, fun.Polar(a74, 20 * pi / 180, 1), a30, fun.Polar(a30, 267 * pi / 180, 1));
            var a76 = fun.Inters(a75, fun.Polar(a75, 307 * pi / 180, 1), a31, fun.Polar(a31, 267 * pi / 180, 1));
            var a77 = fun.Inters(a76, fun.Polar(a76, 28 * pi / 180, 1), a32, fun.Polar(a32, 267 * pi / 180, 1));
            var a78 = fun.Inters(a77, fun.Polar(a77, 311 * pi / 180, 1), a33, fun.Polar(a33, 267 * pi / 180, 1));
            var a79 = fun.Inters(a78, fun.Polar(a78, 22 * pi / 180, 1), a34, fun.Polar(a34, 267 * pi / 180, 1));
            var a80 = fun.Inters(a79, fun.Polar(a79, 312 * pi / 180, 1), a35, fun.Polar(a35, 267 * pi / 180, 1));
            var a81 = fun.Inters(a80, fun.Polar(a80, 33 * pi / 180, 1), a36, fun.Polar(a36, 267 * pi / 180, 1));
            var a82 = fun.Inters(a81, fun.Polar(a81, 318 * pi / 180, 1), a37, fun.Polar(a37, 267 * pi / 180, 1));
            var a83 = fun.Inters(a82, fun.Polar(a82, 32 * pi / 180, 1), a38, fun.Polar(a38, 267 * pi / 180, 1));
            var a84 = fun.Inters(a83, fun.Polar(a83, 311 * pi / 180, 1), a39, fun.Polar(a39, 267 * pi / 180, 1));
            var a85 = fun.Inters(a84, fun.Polar(a84, 41 * pi / 180, 1), a40, fun.Polar(a40, 267 * pi / 180, 1));
            var a86 = fun.Inters(a85, fun.Polar(a85, 311 * pi / 180, 1), a41, fun.Polar(a41, 267 * pi / 180, 1));
            var a87 = fun.Inters(a86, fun.Polar(a86, 39 * pi / 180, 1), a42, fun.Polar(a42, 267 * pi / 180, 1));
            var a88 = fun.Inters(a87, fun.Polar(a87, 313 * pi / 180, 1), a43, fun.Polar(a43, 267 * pi / 180, 1));
            var a89 = fun.Inters(a88, fun.Polar(a88, 33 * pi / 180, 1), a44, fun.Polar(a44, 267 * pi / 180, 1));
            var a90 = fun.Inters(a89, fun.Polar(a89, 303 * pi / 180, 1), a45, fun.Polar(a45, 267 * pi / 180, 1));
            var a91 = fun.Inters(a90, v12p, a46, fun.Polar(a46, 267 * pi / 180, 1));
            var a92 = fun.Inters(a90, v12p, a20, fun.Polar(a20, 267 * pi / 180, 1));

            var a93 = fun.Polar(a12, fun.CalAngle(a12, a13), fun.CalDistance(a12, a13) / 2);
            var a94 = new Vector2(v11.X + 7.9 / 30.47 * thl, v11.Y + 0.28 / 12.75 * td);
            var a95 = new Vector2(v11.X + 8.39 / 30.47 * thl, v11.Y - 0.31 / 12.75 * td);
            var a96 = new Vector2(v11.X + 9.06 / 30.47 * thl, v11.Y + 0.36 / 12.75 * td);
            var a97 = new Vector2(v11.X + 9.7 / 30.47 * thl, v11.Y - 0.26 / 12.75 * td);
            var a98 = new Vector2(v11.X + 10.34 / 30.47 * thl, v11.Y + 0.52 / 12.75 * td);
            var a99 = new Vector2(v11.X + 11.08 / 30.47 * thl, v11.Y - 0.09 / 12.75 * td);
            var a100 = new Vector2(v11.X + 11.57 / 30.47 * thl, v11.Y + 0.72 / 12.75 * td);
            var a101 = new Vector2(v11.X + 12.24 / 30.47 * thl, v11.Y - 0.06 / 12.75 * td);
            var a102 = new Vector2(v11.X + 12.81 / 30.47 * thl, v11.Y + 0.75 / 12.75 * td);
            var a103 = new Vector2(v11.X + 13.48 / 30.47 * thl, v11.Y + 0.03 / 12.75 * td);
            var a104 = new Vector2(v11.X + 14.11 / 30.47 * thl, v11.Y + 0.83 / 12.75 * td);
            var a105 = new Vector2(v11.X + 14.64 / 30.47 * thl, v11.Y + 0.03 / 12.75 * td);
            var a106 = new Vector2(v11.X + 15.38 / 30.47 * thl, v11.Y + 0.93 / 12.75 * td);
            var a107 = new Vector2(v11.X + 15.96 / 30.47 * thl, v11.Y + 0.04 / 12.75 * td);
            var a108 = new Vector2(v11.X + 16.67 / 30.47 * thl, v11.Y + 0.88 / 12.75 * td);
            var a109 = new Vector2(v11.X + 17.29 / 30.47 * thl, v11.Y + 0.05 / 12.75 * td);
            var a110 = new Vector2(v11.X + 17.88 / 30.47 * thl, v11.Y + 0.84 / 12.75 * td);
            var a111 = new Vector2(v11.X + 18.62 / 30.47 * thl, v11.Y + 0.06 / 12.75 * td);
            var a112 = new Vector2(v11.X + 19.18 / 30.47 * thl, v11.Y + 0.88 / 12.75 * td);
            var a113 = new Vector2(v11.X + 19.76 / 30.47 * thl, v11.Y + 0.07 / 12.75 * td);
            var a114 = new Vector2(v11.X + 20.41 / 30.47 * thl, v11.Y + 0.79 / 12.75 * td);
            var a115 = new Vector2(v11.X + 21.03 / 30.47 * thl, v11.Y + 0.08 / 12.75 * td);
            var a116 = new Vector2(v11.X + 21.54 / 30.47 * thl, v11.Y + 0.72 / 12.75 * td);
            var a117 = new Vector2(v11.X + 22.27 / 30.47 * thl, v11.Y + 0.09 / 12.75 * td);
            var a118 = new Vector2(v11.X + 22.84 / 30.47 * thl, v11.Y + 0.78 / 12.75 * td);
            var a119 = new Vector2(v11.X + 23.54 / 30.47 * thl, v11.Y + 0.1 / 12.75 * td);
            var a120 = new Vector2(v11.X + 24.01 / 30.47 * thl, v11.Y + 0.78 / 12.75 * td);
            var a121 = new Vector2(v11.X + 24.67 / 30.47 * thl, v11.Y + 0.11 / 12.75 * td);
            var a122 = new Vector2(v11.X + 25.32 / 30.47 * thl, v11.Y + 0.71 / 12.75 * td);
            var a123 = new Vector2(v11.X + 25.98 / 30.47 * thl, v11.Y + 0.12 / 12.75 * td);
            var a124 = new Vector2(v11.X + 26.36 / 30.47 * thl, v11.Y + 0.58 / 12.75 * td);
            var a125 = new Vector2(v11.X + 26.9 / 30.47 * thl, v11.Y + 0.36 / 12.75 * td);
            var a126 = new Vector2(v11.X + 27.29 / 30.47 * thl, v11.Y + 0.574 / 12.75 * td);
            var a127 = new Vector2(v11.X + 27.64 / 30.47 * thl, v11.Y + 0.52 / 12.75 * td);
            var a128 = v12;
            var a129 = fun.Inters(a114, fun.Polar(a114, 294 * pi / 180, 1), a115, fun.Polar(a115, 259 * pi / 180, 1));
            var a130 = fun.Inters(a129, fun.Polar(a129, 43 * pi / 180, 1), a116, fun.Polar(a116, 267 * pi / 180, 1));
            var a131 = fun.Inters(a130, fun.Polar(a130, 313 * pi / 180, 1), a117, fun.Polar(a117, 267 * pi / 180, 1));
            var a132 = fun.Inters(a131, fun.Polar(a131, 43 * pi / 180, 1), a118, fun.Polar(a118, 267 * pi / 180, 1));
            var a133 = fun.Inters(a132, fun.Polar(a132, 309 * pi / 180, 1), a119, fun.Polar(a119, 267 * pi / 180, 1));
            var a134 = fun.Inters(a133, fun.Polar(a133, 62 * pi / 180, 1), a120, fun.Polar(a120, 267 * pi / 180, 1));
            var a135 = fun.Inters(a134, fun.Polar(a134, 302 * pi / 180, 1), a121, fun.Polar(a121, 267 * pi / 180, 1));
            var a136 = fun.Inters(a135, fun.Polar(a135, 47 * pi / 180, 1), a122, fun.Polar(a122, 267 * pi / 180, 1));
            var a137 = fun.Inters(a136, fun.Polar(a136, 317 * pi / 180, 1), a123, fun.Polar(a123, 267 * pi / 180, 1));
            var a138 = fun.Inters(a137, fun.Polar(a137, 48 * pi / 180, 1), a124, fun.Polar(a124, 267 * pi / 180, 1));
            var a142 = fun.Polar(v12, -90 * pi / 180, 2.37 / 12.75 * td);
            var a139 = fun.Inters(a138, a142, a125, fun.Polar(a125, 267 * pi / 180, 1));
            var a140 = fun.Inters(a138, a142, a126, fun.Polar(a126, 267 * pi / 180, 1));
            var a141 = fun.Inters(a138, a142, a127, fun.Polar(a127, 267 * pi / 180, 1));


            var a142p = v11p;
            var a143 = new Vector2(v11p.X + 0.4 / 30.47 * thl, v11p.Y - 0.95 / 12.75 * td);
            var a144 = new Vector2(v11p.X + 0.88 / 30.47 * thl, v11p.Y - 0.19 / 12.75 * td);
            var a145 = new Vector2(v11p.X + 1.55 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a146 = new Vector2(v11p.X + 2.17 / 30.47 * thl, v11p.Y - 0.23 / 12.75 * td);
            var a147 = new Vector2(v11p.X + 2.83 / 30.47 * thl, v11p.Y - 0.97 / 12.75 * td);
            var a148 = new Vector2(v11p.X + 3.43 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a149 = new Vector2(v11p.X + 4.09 / 30.47 * thl, v11p.Y - 0.96 / 12.75 * td);
            var a150 = new Vector2(v11p.X + 4.69 / 30.47 * thl, v11p.Y - 0.17 / 12.75 * td);
            var a151 = new Vector2(v11p.X + 5.27 / 30.47 * thl, v11p.Y - 0.95 / 12.75 * td);
            var a152 = new Vector2(v11p.X + 5.88 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a153 = new Vector2(v11p.X + 6.47 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a154 = new Vector2(v11p.X + 7.23 / 30.47 * thl, v11p.Y - 0.17 / 12.75 * td);
            var a155 = new Vector2(v11p.X + 7.81 / 30.47 * thl, v11p.Y - 0.99 / 12.75 * td);
            var a156 = new Vector2(v11p.X + 8.4 / 30.47 * thl, v11p.Y - 0.2 / 12.75 * td);
            var a157 = new Vector2(v11p.X + 9.04 / 30.47 * thl, v11p.Y - 0.94 / 12.75 * td);
            var a158 = new Vector2(v11p.X + 9.81 / 30.47 * thl, v11p.Y - 0.05 / 12.75 * td);
            var a159 = new Vector2(v11p.X + 10.35 / 30.47 * thl, v11p.Y - 0.87 / 12.75 * td);
            var a160 = new Vector2(v11p.X + 11.05 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a161 = new Vector2(v11p.X + 11.64 / 30.47 * thl, v11p.Y - 0.89 / 12.75 * td);
            var a162 = new Vector2(v11p.X + 12.16 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a163 = new Vector2(v11p.X + 12.82 / 30.47 * thl, v11p.Y - 0.89 / 12.75 * td);
            var a164 = new Vector2(v11p.X + 13.47 / 30.47 * thl, v11p.Y - 0.08 / 12.75 * td);
            var a165 = new Vector2(v11p.X + 14.07 / 30.47 * thl, v11p.Y - 0.93 / 12.75 * td);
            var a166 = new Vector2(v11p.X + 14.79 / 30.47 * thl, v11p.Y - 0.12 / 12.75 * td);
            var a167 = new Vector2(v11p.X + 15.34 / 30.47 * thl, v11p.Y - 1 / 12.75 * td);
            var a168 = new Vector2(v11p.X + 16.01 / 30.47 * thl, v11p.Y - 0.13 / 12.75 * td);
            var a169 = new Vector2(v11p.X + 16.6 / 30.47 * thl, v11p.Y - 0.94 / 12.75 * td);
            var a170 = new Vector2(v11p.X + 17.33 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a171 = new Vector2(v11p.X + 17.81 / 30.47 * thl, v11p.Y - 0.74 / 12.75 * td);
            var a172 = new Vector2(v11p.X + 18.49 / 30.47 * thl, v11p.Y - 0 / 12.75 * td);
            var a173 = new Vector2(v11p.X + 19.17 / 30.47 * thl, v11p.Y - 0.55 / 12.75 * td);
            var a174 = new Vector2(v11p.X + 19.83 / 30.47 * thl, v11p.Y + 0.2 / 12.75 * td);
            var a175 = new Vector2(v11p.X + 20.36 / 30.47 * thl, v11p.Y - 0.48 / 12.75 * td);
            var a176 = new Vector2(v11p.X + 21.02 / 30.47 * thl, v11p.Y + 0.27 / 12.75 * td);
            var a177 = new Vector2(v11p.X + 21.6 / 30.47 * thl, v11p.Y - 0.24 / 12.75 * td);
            var a178 = new Vector2(v11p.X + 22.13 / 30.47 * thl, v11p.Y + 0.42 / 12.75 * td);
            var a179 = a84;
            var a180 = fun.Polar(a142p, 90 * pi / 180, 1.51 / 12.75 * td);
            var a181 = fun.Inters(a180, fun.Polar(a180, 22 * pi / 180, 1), a144, fun.Polar(a144, 87 * pi / 180, 1));
            var a182 = fun.Inters(a181, fun.Polar(a181, 315 * pi / 180, 1), a145, fun.Polar(a145, 87 * pi / 180, 1));
            var a183 = fun.Inters(a182, fun.Polar(a182, 35 * pi / 180, 1), a146, fun.Polar(a146, 87 * pi / 180, 1));
            var a184 = fun.Inters(a183, fun.Polar(a183, 312 * pi / 180, 1), a147, fun.Polar(a147, 87 * pi / 180, 1));
            var a185 = fun.Inters(a184, fun.Polar(a184, 41 * pi / 180, 1), a148, fun.Polar(a148, 87 * pi / 180, 1));
            var a186 = fun.Inters(a185, fun.Polar(a185, 314 * pi / 180, 1), a149, fun.Polar(a149, 87 * pi / 180, 1));
            var a187 = fun.Inters(a186, fun.Polar(a186, 38 * pi / 180, 1), a150, fun.Polar(a150, 87 * pi / 180, 1));
            var a188 = fun.Inters(a187, fun.Polar(a187, 314 * pi / 180, 1), a151, fun.Polar(a151, 87 * pi / 180, 1));
            var a189 = fun.Inters(a188, fun.Polar(a188, 38 * pi / 180, 1), a152, fun.Polar(a152, 87 * pi / 180, 1));
            var a190 = fun.Inters(a189, fun.Polar(a189, 308 * pi / 180, 1), a153, fun.Polar(a153, 87 * pi / 180, 1));
            var a191 = fun.Inters(a190, fun.Polar(a190, 39 * pi / 180, 1), a154, fun.Polar(a154, 87 * pi / 180, 1));
            var a192 = fun.Inters(a191, fun.Polar(a191, 309 * pi / 180, 1), a155, fun.Polar(a155, 87 * pi / 180, 1));
            var a193 = fun.Inters(a192, fun.Polar(a192, 32 * pi / 180, 1), a156, fun.Polar(a156, 87 * pi / 180, 1));
            var a194 = fun.Inters(a193, fun.Polar(a193, 311 * pi / 180, 1), a157, fun.Polar(a157, 87 * pi / 180, 1));
            var a195 = new Vector2(v11.X - 1 / 30.47 * thl, v11.Y - 4.14 / 12.75 * td);
            var a196 = new Vector2(r12.X, v11.Y - 5.8 / 12.75 * td);
            var a197 = new Vector2(v11.X - 0.98 / 30.47 * thl, v11.Y - 7.7 / 12.75 * td);


            var polyline6 = Pus.AddPointsToLwPolyLine(v11, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21);
            var polyline7 = Pus.AddPointsToLwPolyLine(a47, a48, a49, a50, a51, a52, a53, a54, a55, a56, a57, a71, a72, a73, a74, a75, a76, a77, a78, a79, a80, a81, a82, a83, a84, a85, a86, a87, a88, a89, a90, v12p);
            var polyline8 = Pus.AddPointsToLwPolyLine(a93, a94, a95, a96, a97, a98, a99, a100, a101, a102, a103, a104, a105, a106, a107, a108, a109, a110, a111, a112, a113, a114, a115, a116, a117, a118, a119, a120, a121, a122, a123, a124, a125, a126, a127, v12);
            var polyline9 = Pus.AddPointsToLwPolyLine(a114, a129, a130, a131, a132, a133, a134, a135, a136, a137, a138, a142);
            var polyline10 = Pus.AddPointsToLwPolyLine(a142p, a143, a144, a145, a146, a147, a148, a149, a150, a151, a152, a153, a154, a155, a156, a157, a158, a159, a160, a161, a162, a163, a164, a165, a166, a167, a168, a169, a170, a171, a172, a173, a174, a175, a176, a177, a178, a179);
            var polyline11 = Pus.AddPointsToLwPolyLine(a180, a181, a182, a183, a184, a185, a186, a187, a188, a189, a190, a191, a192, a193, a194, a158);
            /* dxf.AddEntity(polyline6);
             dxf.AddEntity(polyline7);
             dxf.AddEntity(polyline8);
             dxf.AddEntity(polyline9);
             dxf.AddEntity(polyline10);
             dxf.AddEntity(polyline11);*/

            var line2 = new Line(a1, a48);
            var line3 = new Line(a2, a49);
            var line4 = new Line(a3, a50);
            var line5 = new Line(a4, a51);
            var line6 = new Line(a5, a52);
            var line7 = new Line(a6, a53);
            var line8 = new Line(a7, a54);
            var line9 = new Line(a8, a55);
            var line10 = new Line(a9, a56);
            var line11 = new Line(a10, a58);
            var line12 = new Line(a11, a59);
            var line13 = new Line(a12, a60);
            var line14 = new Line(a13, a61);
            var line15 = new Line(a14, a62);
            var line16 = new Line(a15, a63);
            var line17 = new Line(a16, a64);
            var line18 = new Line(a17, a65);
            var line19 = new Line(a18, a66);
            var line20 = new Line(a19, a67);
            var line21 = new Line(a22, a68);
            var line22 = new Line(a23, a69);
            var line23 = new Line(a24, a70);
            var line24 = new Line(a25, a57);
            var line25 = new Line(a26, a71);
            var line26 = new Line(a27, a72);
            var line27 = new Line(a28, a73);
            var line28 = new Line(a29, a74);
            var line29 = new Line(a30, a75);
            var line30 = new Line(a31, a76);
            var line31 = new Line(a32, a77);
            var line32 = new Line(a33, a78);
            var line33 = new Line(a34, a79);
            var line34 = new Line(a35, a80);
            var line35 = new Line(a36, a81);
            var line36 = new Line(a37, a82);
            var line37 = new Line(a38, a83);
            var line38 = new Line(a39, a84);
            var line39 = new Line(a40, a85);
            var line40 = new Line(a41, a86);
            var line41 = new Line(a42, a87);
            var line42 = new Line(a43, a88);
            var line43 = new Line(a44, a89);
            var line44 = new Line(a45, a90);
            var line45 = new Line(a46, a91);
            var line46 = new Line(a20, a92);
            var line47 = new Line(a115, a129);
            var line48 = new Line(a116, a130);
            var line49 = new Line(a117, a131);
            var line50 = new Line(a118, a132);
            var line51 = new Line(a119, a133);
            var line52 = new Line(a120, a134);
            var line53 = new Line(a121, a135);
            var line54 = new Line(a122, a136);
            var line55 = new Line(a123, a137);
            var line56 = new Line(a124, a138);
            var line57 = new Line(a125, a139);
            var line58 = new Line(a126, a140);
            var line59 = new Line(a127, a141);
            var line60 = new Line(v11, v11p);
            var line61 = new Line(a181, a144);
            var line62 = new Line(a182, a145);
            var line63 = new Line(a183, a146);
            var line64 = new Line(a184, a147);
            var line65 = new Line(a185, a148);
            var line66 = new Line(a186, a149);
            var line67 = new Line(a187, a150);
            var line68 = new Line(a188, a151);
            var line69 = new Line(a189, a152);
            var line70 = new Line(a190, a153);
            var line71 = new Line(a191, a154);
            var line72 = new Line(a192, a155);
            var line73 = new Line(a193, a156);
            var line74 = new Line(a194, a157);
            var line75 = new Line(v12, v12p);

            var arc5 = fun.DrawArc3(a47, a195, a196);
            var arc6 = fun.DrawArc3(a196, a197, a180);

            var line01 = Pus.Mirrorline(line1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line02 = Pus.Mirrorline(line2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line03 = Pus.Mirrorline(line3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line04 = Pus.Mirrorline(line4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line05 = Pus.Mirrorline(line5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line06 = Pus.Mirrorline(line6, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line07 = Pus.Mirrorline(line7, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line08 = Pus.Mirrorline(line8, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line09 = Pus.Mirrorline(line9, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line010 = Pus.Mirrorline(line10, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line011 = Pus.Mirrorline(line11, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line012 = Pus.Mirrorline(line12, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line013 = Pus.Mirrorline(line13, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line014 = Pus.Mirrorline(line14, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line015 = Pus.Mirrorline(line15, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line016 = Pus.Mirrorline(line16, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line017 = Pus.Mirrorline(line17, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line018 = Pus.Mirrorline(line18, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line019 = Pus.Mirrorline(line19, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line020 = Pus.Mirrorline(line20, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line021 = Pus.Mirrorline(line21, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line022 = Pus.Mirrorline(line22, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line023 = Pus.Mirrorline(line23, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line024 = Pus.Mirrorline(line24, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line025 = Pus.Mirrorline(line25, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line026 = Pus.Mirrorline(line26, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line027 = Pus.Mirrorline(line27, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line028 = Pus.Mirrorline(line28, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line029 = Pus.Mirrorline(line29, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line030 = Pus.Mirrorline(line30, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line031 = Pus.Mirrorline(line31, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line032 = Pus.Mirrorline(line32, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line033 = Pus.Mirrorline(line33, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line034 = Pus.Mirrorline(line34, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line035 = Pus.Mirrorline(line35, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line036 = Pus.Mirrorline(line36, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line037 = Pus.Mirrorline(line37, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line038 = Pus.Mirrorline(line38, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line039 = Pus.Mirrorline(line39, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line040 = Pus.Mirrorline(line40, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line041 = Pus.Mirrorline(line41, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line042 = Pus.Mirrorline(line42, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line043 = Pus.Mirrorline(line43, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line044 = Pus.Mirrorline(line44, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line045 = Pus.Mirrorline(line45, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line046 = Pus.Mirrorline(line46, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line047 = Pus.Mirrorline(line47, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line048 = Pus.Mirrorline(line48, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line049 = Pus.Mirrorline(line49, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line050 = Pus.Mirrorline(line50, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line051 = Pus.Mirrorline(line51, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line052 = Pus.Mirrorline(line52, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line053 = Pus.Mirrorline(line53, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line054 = Pus.Mirrorline(line54, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line055 = Pus.Mirrorline(line55, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line056 = Pus.Mirrorline(line56, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line057 = Pus.Mirrorline(line57, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line058 = Pus.Mirrorline(line58, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line059 = Pus.Mirrorline(line59, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line060 = Pus.Mirrorline(line60, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line061 = Pus.Mirrorline(line61, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line062 = Pus.Mirrorline(line62, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line063 = Pus.Mirrorline(line63, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line064 = Pus.Mirrorline(line64, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line065 = Pus.Mirrorline(line65, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line066 = Pus.Mirrorline(line66, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line067 = Pus.Mirrorline(line67, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line068 = Pus.Mirrorline(line68, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line069 = Pus.Mirrorline(line69, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line070 = Pus.Mirrorline(line70, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line071 = Pus.Mirrorline(line71, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line072 = Pus.Mirrorline(line72, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line073 = Pus.Mirrorline(line73, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line074 = Pus.Mirrorline(line74, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var line075 = Pus.Mirrorline(line75, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline01 = Pus.MirrorPolyline(polyline1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline02 = Pus.MirrorPolyline(polyline2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline03 = Pus.MirrorPolyline(polyline3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline04 = Pus.MirrorPolyline(polyline4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline05 = Pus.MirrorPolyline(polyline5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline06 = Pus.MirrorPolyline(polyline6, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline07 = Pus.MirrorPolyline(polyline7, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline08 = Pus.MirrorPolyline(polyline8, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline09 = Pus.MirrorPolyline(polyline9, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline010 = Pus.MirrorPolyline(polyline10, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var polyline011 = Pus.MirrorPolyline(polyline11, v1, fun.Polar(v1, 90 * pi / 180, 1));
            
            fun.drawBline(dxf, line01, 0.2, contour);
            fun.drawBline(dxf, line02, 0.2, contour);
            fun.drawBline(dxf, line03, 0.2, contour);
            fun.drawBline(dxf, line04, 0.2, contour);
            fun.drawBline(dxf, line05, 0.2, contour);
            fun.drawBline(dxf, line06, 0.2, contour);
            fun.drawBline(dxf, line07, 0.2, contour);
            fun.drawBline(dxf, line08, 0.2, contour);
            fun.drawBline(dxf, line09, 0.2, contour);
            fun.drawBline(dxf, line010, 0.2, contour);
            fun.drawBline(dxf, line011, 0.2, contour);
            fun.drawBline(dxf, line012, 0.2, contour);
            fun.drawBline(dxf, line013, 0.2, contour);
            fun.drawBline(dxf, line014, 0.2, contour);
            fun.drawBline(dxf, line015, 0.2, contour);
            fun.drawBline(dxf, line016, 0.2, contour);
            fun.drawBline(dxf, line017, 0.2, contour);
            fun.drawBline(dxf, line018, 0.2, contour);
            fun.drawBline(dxf, line019, 0.2, contour);
            fun.drawBline(dxf, line020, 0.2, contour);
            fun.drawBline(dxf, line021, 0.2, contour);
            fun.drawBline(dxf, line022, 0.2, contour);
            fun.drawBline(dxf, line023, 0.2, contour);
            fun.drawBline(dxf, line024, 0.2, contour);
            fun.drawBline(dxf, line025, 0.2, contour);
            fun.drawBline(dxf, line026, 0.2, contour);
            fun.drawBline(dxf, line027, 0.2, contour);
            fun.drawBline(dxf, line028, 0.2, contour);
            fun.drawBline(dxf, line029, 0.2, contour);
            fun.drawBline(dxf, line030, 0.2, contour);
            fun.drawBline(dxf, line031, 0.2, contour);
            fun.drawBline(dxf, line032, 0.2, contour);
            fun.drawBline(dxf, line033, 0.2, contour);
            fun.drawBline(dxf, line034, 0.2, contour);
            fun.drawBline(dxf, line035, 0.2, contour);
            fun.drawBline(dxf, line036, 0.2, contour);
            fun.drawBline(dxf, line037, 0.2, contour);
            fun.drawBline(dxf, line038, 0.2, contour);
            fun.drawBline(dxf, line039, 0.2, contour);
            fun.drawBline(dxf, line040, 0.2, contour);
            fun.drawBline(dxf, line041, 0.2, contour);
            fun.drawBline(dxf, line042, 0.2, contour);
            fun.drawBline(dxf, line043, 0.2, contour);
            fun.drawBline(dxf, line044, 0.2, contour);
            fun.drawBline(dxf, line045, 0.2, contour);
            fun.drawBline(dxf, line046, 0.2, contour);
            fun.drawBline(dxf, line047, 0.2, contour);
            fun.drawBline(dxf, line048, 0.2, contour);
            fun.drawBline(dxf, line049, 0.2, contour);
            fun.drawBline(dxf, line050, 0.2, contour);
            fun.drawBline(dxf, line051, 0.2, contour);
            fun.drawBline(dxf, line052, 0.2, contour);
            fun.drawBline(dxf, line053, 0.2, contour);
            fun.drawBline(dxf, line054, 0.2, contour);
            fun.drawBline(dxf, line055, 0.2, contour);
            fun.drawBline(dxf, line056, 0.2, contour);
            fun.drawBline(dxf, line057, 0.2, contour);
            fun.drawBline(dxf, line058, 0.2, contour);
            fun.drawBline(dxf, line059, 0.2, contour);
            fun.drawBline(dxf, line060, 0.2, contour);
            fun.drawBline(dxf, line061, 0.2, contour);
            fun.drawBline(dxf, line062, 0.2, contour);
            fun.drawBline(dxf, line063, 0.2, contour);
            fun.drawBline(dxf, line064, 0.2, contour);
            fun.drawBline(dxf, line065, 0.2, contour);
            fun.drawBline(dxf, line066, 0.2, contour);
            fun.drawBline(dxf, line067, 0.2, contour);
            fun.drawBline(dxf, line068, 0.2, contour);
            fun.drawBline(dxf, line069, 0.2, contour);
            fun.drawBline(dxf, line070, 0.2, contour);
            fun.drawBline(dxf, line071, 0.2, contour);
            fun.drawBline(dxf, line072, 0.2, contour);
            fun.drawBline(dxf, line073, 0.2, contour);
            fun.drawBline(dxf, line074, 0.2, contour);
            fun.drawBline(dxf, line075, 0.2, contour);
            fun.PolyFill(dxf, polyline01, 0.2, contour);
            fun.PolyFill(dxf, polyline02, 0.2, contour);
            fun.PolyFill(dxf, polyline03, 0.2, contour);
            fun.PolyFill(dxf, polyline04, 0.2, contour);
            fun.PolyFill(dxf, polyline05, 0.2, contour);
            fun.PolyFill(dxf, polyline06, 0.2, contour);
            fun.PolyFill(dxf, polyline07, 0.2, contour);
            fun.PolyFill(dxf, polyline08, 0.2, contour);
            fun.PolyFill(dxf, polyline09, 0.2, contour);
            fun.PolyFill(dxf, polyline010, 0.2, contour);
            fun.PolyFill(dxf, polyline011, 0.2, contour);

            var arc01 = fun.mirrorarc(arc1, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc02 = fun.mirrorarc(arc2, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc03 = fun.mirrorarc(arc3, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc04 = fun.mirrorarc(arc4, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc05 = fun.mirrorarc(arc5, v1, fun.Polar(v1, 90 * pi / 180, 1));
            var arc06 = fun.mirrorarc(arc6, v1, fun.Polar(v1, 90 * pi / 180, 1));


            fun.drawBArc(dxf, arc01, 0.2, contour);
            fun.drawBArc(dxf, arc02, 0.2, contour);
            fun.drawBArc(dxf, arc03, 0.2, contour);
            fun.drawBArc(dxf, arc04, 0.2, contour);
            fun.drawBArc(dxf, arc05, 0.2, contour);
            fun.drawBArc(dxf, arc06, 0.2, contour);
            

            //dxf.AddEntity(new EntityObject[] { line2, line3, line4, line5, line6, line7, line8, line9, line10, line11, line12, line13, line14, line15, line16, line17, line18, line19, line20, line21, line22, line23, line24, line25, line26, line27, line28, line29, line30, line31, line32, line33, line34, line35, line36, line37, line38, line39, line40, line41, line42, line43, line44, line45, line46 });
            //dxf.AddEntity(new EntityObject[] { line47, line48, line49, line50, line51, line52, line53, line54, line55, line56, line57, line58, line59, line60, line61, line62, line63, line64, line65, line66, line67, line68, line69, line70, line71, line72, line73, line74, line75 });
            //dxf.AddEntity(new EntityObject[] { arc5, arc6 });


            var z1 = fun.Polar(v1, 0, 16.58 / 51.69 * oal);
            var z2 = fun.Polar(v1, 0, 25.37 / 51.69 * oal);

            Line line00 = new Line(fun.Polar(v1, 0, 5), fun.Polar(v1, pi, oal + 5));
            line00.Layer = centre;
            line00.Lineweight = Lineweight.W25;
            line00.Linetype = Linetype.DashDot;
            dxf.AddEntity(line00);
            
            //标注

            var height = 2 * scale;//字体高度
            var offset = 10 * scale;//偏移量
            var arrowsize = 1 * scale;//箭头大小
            var exline = 1 * scale;//延伸线长度

             
            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-v12.X, v12.Y), 0, offset * 2.5, 0, height, arrowsize, exline, "OAL", "", "");
            fun.dimrot1(dxf, new Vector2(-z1.X, z1.Y), new Vector2(-v12.X, v12.Y), 0, offset * 2, 0, height, arrowsize, exline, "LPR", "", "");
            fun.dimrot1(dxf, new Vector2(-r11.X + fun.CalDistance(r11 , r12) / 2, z1.Y), new Vector2(-v12.X, v12.Y), 0, offset * 1.5, 0, height, arrowsize, exline, "LU", "", "");
            fun.dimrot1(dxf, new Vector2(-v11.X, v11.Y), new Vector2(-v12.X, v12.Y), 0, offset, 0, height, arrowsize, exline, "THL", "", "");
            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-v10.X, z2.Y), 0, offset, 0, height, arrowsize, exline, "LS", "", "");
            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-v6p.X, v6p.Y), 180, offset, 0, height, arrowsize, exline, "DRVL", "", "");
            fun.dimrot1(dxf, new Vector2(-a153.X, a153.Y), new Vector2(-a151.X, a151.Y), 180, offset * 0.8, 0, height, arrowsize, exline, "TP", "", "");
            fun.dimrot1(dxf, new Vector2(-a90.X, a90.Y), new Vector2(-v12p.X, v12p.Y), 180, offset * 0.8, 0, height, arrowsize, exline, "TCL", "", "");
            fun.dimrot1(dxf, new Vector2(-z1.X, z1.Y), new Vector2(-a90.X, a90.Y), 180, offset * 1.5, 0, height, arrowsize, exline, "LTA", "", "");
            fun.dimrot1(dxf, new Vector2(-v1.X, v1.Y), new Vector2(-a90.X, a90.Y), 180, offset * 2, 0, height, arrowsize, exline, "LF", "", "");
            fun.dimrot1(dxf, new Vector2(-v3.X, v3.Y), new Vector2(-v3p.X, v3p.Y), -90, offset * 0.8, 0, height, arrowsize, exline, "DCONMS", "", "");
            fun.dimrot1(dxf, new Vector2(-v12.X, v12.Y), new Vector2(-v12p.X, v12p.Y), 90, offset * 0.8, 0, height, arrowsize, exline, "TCPD", "", "");
            fun.dimrot1(dxf, new Vector2(-a163.X, a163.Y), new Vector2(-a106.X, a106.Y), 90, offset * 2.5, 0, height, arrowsize, exline, "TD", "", "");
            fun.jdbz2(dxf, new Line(new Vector2(-v0.X, v0.Y), new Vector2(-v1.X, v1.Y)), new Line(new Vector2(-a20.X, a20.Y), new Vector2(-a19.X, a19.Y)), offset * 1.5, height, arrowsize, exline, "FHA", "", "");
            fun.jt(dxf, new Vector2(-z1.X - 5, z1.Y - dconms / 2), -125, 16, height, "CCMS");
            fun.jt(dxf, new Vector2(-a145.X, a145.Y), -45, 10, height, "TDZ");
            fun.jt0(dxf, v1, -45, 15, height, "PCS");
            fun.jt0(dxf, new Vector2(-z1.X, z1.Y), -45, 15, height, "MCS");
            fun.jt0(dxf, new Vector2(-v12.X, z1.Y), 45, 15, height, "CLP");
            fun.jt(dxf, new Vector2(-v12.X - 30, a145.Y - 30), 0, 10, height, "FDP");
            fun.Axis(dxf, v1, 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, new Vector2(-z1.X + 50, z1.Y - 60), 0, -90, "Z", "X", "Y", 1.5, height, 0);
            fun.Axis(dxf, new Vector2(-z1.X, z1.Y), 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, new Vector2(-v12.X, z1.Y), 0, -90, "", "", "", 1, height, 0);

            Text text1 = new Text("A", new Vector2(-v12.X - 8, z1.Y + 1), height, 0);
            dxf.AddEntity(text1);
            
            var p1 = new Vector2(-v12.X, z1.Y);
            var p2 = fun.Polar(p1, 135 * pi / 180, 3);
            var p3 = fun.Polar(p1, 45 * pi / 180, 3);
            var p4 = fun.Polar(p1, -45 * pi / 180, 3);
            var p5 = fun.Polar(p1, -135 * pi / 180, 3);
            var p6 = new Vector2(-z1.X, z1.Y);
            var p7 = fun.Polar(p6, 90 * pi / 180, dconms * 1.5);
            var p8 = fun.Polar(p7, 60 * pi / 180, dconms / 2);
            var p9 = fun.Polar(p8, 0, dconms / 2);
            var p10 = fun.mirrorpoint(p7, v0, v1);
            var p11 = fun.mirrorpoint(p8, v0, v1);
            var p12 = fun.mirrorpoint(p9, v0, v1);
            var p14 = new Vector2(-v12.X - 80, z1.Y);
            var p15 = fun.Polar(p14, 90 * pi / 180, 19);
            var p16 = fun.Polar(p14, -90 * pi / 180, 19);
            var p17 = fun.Polar(p14, -90 * pi / 180, 12);
            var p18 = fun.Polar(p17, 2 * pi / 180, 4.9);
            var p19 = fun.Polar(p18, 11 * pi / 180, 11.6);
            var p20 = fun.Polar(p14, pi, 3);
            var p21 = fun.Polar(p14, 90 * pi / 180, 5.2);
            var p22 = fun.Polar(p14, -90 * pi / 180, 5.2);
            var p23 = fun.Polar(p14, pi, 6);
            var p24 = fun.Polar(p14, 0, 18);
            var p25 = fun.Polar(p14, 84 * pi / 180, 19.4);
            var p26 = fun.Polar(p14, 62 * pi / 180, 14.4);
            var p27 = fun.Polar(p14, 38 * pi / 180, 15.9);
            var p28 = fun.Polar(p14, 4 * pi / 180, 15.72);
            var p29 = fun.Polar(p14, 345 * pi / 180, 18.66);
            var p30 = fun.Polar(p14, 302 * pi / 180, 20.22);
            var p31 = fun.Polar(p14, 279 * pi / 180, 18.08);
            var p32 = fun.Polar(p14, 90 * pi / 180, 18.16);
            var p33 = fun.Polar(p16, -90 * pi / 180, 22);
            var p34 = fun.Polar(p16, -90 * pi / 180, 20);
            var p35 = fun.Polar(p34, 0, 25);
            var p36 = fun.Polar(p20, -90 * pi / 180, 52);
            var p37 = fun.Polar(p20, -90 * pi / 180, 50);
            var p38 = fun.Polar(p37, 5 * pi / 180, 13.5);


            var line76 = new Line(p15, p16);
            var line77 = new Line(p32, p25);
            var line78 = new Line(p21, p20);
            var line79 = new Line(p22, p20);
            var line80 = new Line(p17, p18);
            var line81 = new Line(p18, p19);
            var line82 = new Line(p23, p24);
            line82.Layer = centre;
            line82.Lineweight = Lineweight.W25;
            line82.Linetype = Linetype.DashDot;
            dxf.AddEntity(line82);


            fun.drawBline(dxf, line76, 0.2, contour);
            fun.drawBline(dxf, line77, 0.2, contour);
            fun.drawBline(dxf, line78, 0.2, contour);
            fun.drawBline(dxf, line79, 0.2, contour);
            fun.drawBline(dxf, line80, 0.2, contour);
            fun.drawBline(dxf, line81, 0.2, contour);


            LwPolyline linee1 = new LwPolyline();
            linee1.Vertexes.Add(new LwPolylineVertex(p2));
            linee1.Vertexes.Add(new LwPolylineVertex(p3));
            linee1.Vertexes.Add(new LwPolylineVertex(p4));
            linee1.Vertexes.Add(new LwPolylineVertex(p5));
            linee1.Vertexes.Add(new LwPolylineVertex(p2));
            linee1.Layer = refin;
            linee1.Lineweight = Lineweight.W35;
            linee1.Linetype = Linetype.Dashed;
            dxf.AddEntity(linee1);
            LwPolyline linee2 = new LwPolyline();
            linee2.Vertexes.Add(new LwPolylineVertex(p9));
            linee2.Vertexes.Add(new LwPolylineVertex(p8));
            linee2.Vertexes.Add(new LwPolylineVertex(p7));
            linee2.Vertexes.Add(new LwPolylineVertex(p10));
            linee2.Vertexes.Add(new LwPolylineVertex(p11));
            linee2.Vertexes.Add(new LwPolylineVertex(p12));
            linee2.Layer = refin;
            linee2.Lineweight = Lineweight.W35;
            linee2.Linetype = Linetype.Dashed;
            dxf.AddEntity(linee2);


            List<Vector3> points = new List<Vector3>
           {
                new Vector3(p15.X, p15.Y, 0),
                new Vector3(p25.X, p25.Y, 0),
                new Vector3(p26.X, p26.Y, 0),
                new Vector3(p27.X, p27.Y, 0),
                new Vector3(p28.X, p28.Y, 0),
                new Vector3(p29.X, p29.Y, 0),
                new Vector3(p19.X, p19.Y, 0),
                new Vector3(p30.X, p30.Y, 0),
                new Vector3(p31.X, p31.Y, 0),
                new Vector3(p16.X, p16.Y, 0),
            };

            Spline spline1 = new Spline(points);
            spline1.Layer = contour;
            spline1.Lineweight = Lineweight.W50;
            DxfDocument doc = new DxfDocument();
            dxf.AddEntity(spline1);


            fun.Axis(dxf, new Vector2(p14.X, p14.Y), 0, -90, "", "", "", 1, height, 0);


            fun.text(dxf, fun.Polar(p14, 102 * pi / 180, 27), height, "变体 A");

            Text text3 = new Text("ISYC = 301-02", fun.Polar(fun.Polar(p14, 65 * pi / 180, 95), 0, 100), height * 2, 0);
            dxf.AddEntity(text3);

            var line83 = new Line(p16, p33);
            var line84 = new Line(p20, p36);
            dxf.AddEntity(line83);
            dxf.AddEntity(line84);
            fun.jt(dxf, p34, 0, 25, height, "");
            fun.jt(dxf, p37, 0, 25, height, "");



            Text text5 = new Text("THL", p35, height, 0);
            dxf.AddEntity(text5);
            Text text4 = new Text("OAL,LPR", p38, height, 0);
            dxf.AddEntity(text4);

            var td1 = 27.74;
            var thl1 = 49.06;

            var p39 = new Vector2(v10.X - 50, v1.Y);
            var p40 = fun.Polar(p39, 240 * pi / 180, 150);
            var p41 = fun.Polar(p40, 90 * pi / 180, 13.06 / 2);
            var p42 = fun.Polar(p41, 0, 24);
            var p43 = new Vector2(p40.X - 7.42 / 49.06 * thl1, p40.Y + 16.43 / 27.74 * td1);
            var p44 = new Vector2(p40.X - 9.37 / 49.06 * thl1, p40.Y + 14.69 / 27.74 * td1);
            var p45 = new Vector2(p40.X - 10.5 / 49.06 * thl1, p40.Y + 16.23 / 27.74 * td1);
            var p46 = new Vector2(p40.X - 11.31 / 49.06 * thl1, p40.Y + 14.67 / 27.74 * td1);
            var p47 = new Vector2(p40.X - 12.52 / 49.06 * thl1, p40.Y + 16.09 / 27.74 * td1);
            var p48 = new Vector2(p40.X - 13.21 / 49.06 * thl1, p40.Y + 14.48 / 27.74 * td1);
            var p49 = new Vector2(p40.X - 14.53 / 49.06 * thl1, p40.Y + 15.96 / 27.74 * td1);
            var p50 = new Vector2(p40.X - 15.25 / 49.06 * thl1, p40.Y + 14.35 / 27.74 * td1);
            var p51 = new Vector2(p40.X - 16.44 / 49.06 * thl1, p40.Y + 15.83 / 27.74 * td1);
            var p52 = new Vector2(p40.X - 17.36 / 49.06 * thl1, p40.Y + 14.16 / 27.74 * td1);
            var p53 = new Vector2(p40.X - 18.28 / 49.06 * thl1, p40.Y + 15.71 / 27.74 * td1);
            var p54 = new Vector2(p40.X - 19.47 / 49.06 * thl1, p40.Y + 13.95 / 27.74 * td1);
            var p55 = new Vector2(p40.X - 20.44 / 49.06 * thl1, p40.Y + 15.57 / 27.74 * td1);
            var p56 = new Vector2(p40.X - 21.24 / 49.06 * thl1, p40.Y + 13.95 / 27.74 * td1);
            var p57 = new Vector2(p40.X - 22.64 / 49.06 * thl1, p40.Y + 15.43 / 27.74 * td1);
            var p58 = new Vector2(p40.X - 23.18 / 49.06 * thl1, p40.Y + 13.95 / 27.74 * td1);
            var p59 = new Vector2(p40.X - 24.31 / 49.06 * thl1, p40.Y + 15.32 / 27.74 * td1);
            var p60 = new Vector2(p40.X - 25.29 / 49.06 * thl1, p40.Y + 13.56 / 27.74 * td1);
            var p61 = new Vector2(p40.X - 26.38 / 49.06 * thl1, p40.Y + 15.18 / 27.74 * td1);
            var p62 = new Vector2(p40.X - 27.29 / 49.06 * thl1, p40.Y + 13.5 / 27.74 * td1);
            var p63 = new Vector2(p40.X - 28.4 / 49.06 * thl1, p40.Y + 15.05 / 27.74 * td1);
            var p64 = new Vector2(p40.X - 29.4 / 49.06 * thl1, p40.Y + 13.39 / 27.74 * td1);
            var p65 = new Vector2(p40.X - 30.43 / 49.06 * thl1, p40.Y + 14.91 / 27.74 * td1);
            var p66 = new Vector2(p40.X - 31.41 / 49.06 * thl1, p40.Y + 13.22 / 27.74 * td1);
            var p67 = new Vector2(p40.X - 32.36 / 49.06 * thl1, p40.Y + 14.79 / 27.74 * td1);
            var p68 = new Vector2(p40.X - 33.16 / 49.06 * thl1, p40.Y + 13.19 / 27.74 * td1);
            var p69 = new Vector2(p40.X - 34.14 / 49.06 * thl1, p40.Y + 14.67 / 27.74 * td1);
            var p70 = new Vector2(p40.X - 35.08 / 49.06 * thl1, p40.Y + 12.99 / 27.74 * td1);
            var p71 = new Vector2(p40.X - 36.27 / 49.06 * thl1, p40.Y + 14.53 / 27.74 * td1);
            var p72 = new Vector2(p40.X - 37.13 / 49.06 * thl1, p40.Y + 12.84 / 27.74 * td1);
            var p73 = new Vector2(p40.X - 38.1 / 49.06 * thl1, p40.Y + 14.41 / 27.74 * td1);
            var p74 = new Vector2(p40.X - 39.18 / 49.06 * thl1, p40.Y + 12.49 / 27.74 * td1);
            var p75 = new Vector2(p40.X - 40.12 / 49.06 * thl1, p40.Y + 14.27 / 27.74 * td1);
            var p76 = new Vector2(p40.X - 41.03 / 49.06 * thl1, p40.Y + 12.29 / 27.74 * td1);
            var p77 = new Vector2(p40.X - 42.08 / 49.06 * thl1, p40.Y + 14.15 / 27.74 * td1);
            var p78 = new Vector2(p40.X - 43.17 / 49.06 * thl1, p40.Y + 12.21 / 27.74 * td1);
            var p79 = new Vector2(p40.X - 44.04 / 49.06 * thl1, p40.Y + 13.86 / 27.74 * td1);
            var p80 = new Vector2(p40.X - 45.23 / 49.06 * thl1, p40.Y + 12.03 / 27.74 * td1);
            var p81 = new Vector2(p40.X - 46.26 / 49.06 * thl1, p40.Y + 13.87 / 27.74 * td1);
            var p82 = new Vector2(p40.X - 47.1 / 49.06 * thl1, p40.Y + 11.84 / 27.74 * td1);
            var p83 = new Vector2(p40.X - 48.26 / 49.06 * thl1, p40.Y + 13.74 / 27.74 * td1);
            var p84 = new Vector2(p40.X - 49.4 / 49.06 * thl1, p40.Y + 11.84 / 27.74 * td1);
            var p85 = new Vector2(p40.X - 49.96 / 49.06 * thl1, p40.Y + 13.63 / 27.74 * td1);
            var p86 = new Vector2(p40.X - 50.69 / 49.06 * thl1, p40.Y + 13.58 / 27.74 * td1);
            var p87 = new Vector2(p40.X - 51.92 / 49.06 * thl1, p40.Y + 13.5 / 27.74 * td1);
            var p88 = new Vector2(p40.X - 56.48 / 49.06 * thl1, p40.Y + 13.2 / 27.74 * td1);
            var p89 = new Vector2(p40.X - 56.48 / 49.06 * thl1, p40.Y + 8.13 / 27.74 * td1);
            var p90 = new Vector2(p40.X - 51.72 / 49.06 * thl1, p40.Y + 10.4 / 27.74 * td1);
            var p91 = new Vector2(p40.X - 50.51 / 49.06 * thl1, p40.Y + 10.98 / 27.74 * td1);
            var p40p = fun.Polar(p40, pi, 60 / 49.06 * thl1);
            var p41p = fun.mirrorpoint(p41, p40, p40p);
            var p42p = fun.mirrorpoint(p42, p40, p40p);
            var p43p = fun.mirrorpoint(p43, p40, p40p);
            var p44p = fun.mirrorpoint(p44, p40, p40p);
            var p45p = fun.mirrorpoint(p45, p40, p40p);
            var p46p = fun.mirrorpoint(p46, p40, p40p);
            var p47p = fun.mirrorpoint(p47, p40, p40p);
            var p48p = fun.mirrorpoint(p48, p40, p40p);
            var p49p = fun.mirrorpoint(p49, p40, p40p);
            var p50p = fun.mirrorpoint(p50, p40, p40p);
            var p51p = fun.mirrorpoint(p51, p40, p40p);
            var p52p = fun.mirrorpoint(p52, p40, p40p);
            var p53p = fun.mirrorpoint(p53, p40, p40p);
            var p54p = fun.mirrorpoint(p54, p40, p40p);
            var p55p = fun.mirrorpoint(p55, p40, p40p);
            var p56p = fun.mirrorpoint(p56, p40, p40p);
            var p57p = fun.mirrorpoint(p57, p40, p40p);
            var p58p = fun.mirrorpoint(p58, p40, p40p);
            var p59p = fun.mirrorpoint(p59, p40, p40p);
            var p60p = fun.mirrorpoint(p60, p40, p40p);
            var p61p = fun.mirrorpoint(p61, p40, p40p);
            var p62p = fun.mirrorpoint(p62, p40, p40p);
            var p63p = fun.mirrorpoint(p63, p40, p40p);
            var p64p = fun.mirrorpoint(p64, p40, p40p);
            var p65p = fun.mirrorpoint(p65, p40, p40p);
            var p66p = fun.mirrorpoint(p66, p40, p40p);
            var p67p = fun.mirrorpoint(p67, p40, p40p);
            var p68p = fun.mirrorpoint(p68, p40, p40p);
            var p69p = fun.mirrorpoint(p69, p40, p40p);
            var p70p = fun.mirrorpoint(p70, p40, p40p);
            var p71p = fun.mirrorpoint(p71, p40, p40p);
            var p72p = fun.mirrorpoint(p72, p40, p40p);
            var p73p = fun.mirrorpoint(p73, p40, p40p);
            var p74p = fun.mirrorpoint(p74, p40, p40p);
            var p75p = fun.mirrorpoint(p75, p40, p40p);
            var p76p = fun.mirrorpoint(p76, p40, p40p);
            var p77p = fun.mirrorpoint(p77, p40, p40p);
            var p78p = fun.mirrorpoint(p78, p40, p40p);
            var p79p = fun.mirrorpoint(p79, p40, p40p);
            var p80p = fun.mirrorpoint(p80, p40, p40p);
            var p81p = fun.mirrorpoint(p81, p40, p40p);
            var p82p = fun.mirrorpoint(p82, p40, p40p);
            var p83p = fun.mirrorpoint(p83, p40, p40p);
            var p84p = fun.mirrorpoint(p84, p40, p40p);
            var p85p = fun.mirrorpoint(p85, p40, p40p);
            var p86p = fun.mirrorpoint(p86, p40, p40p);
            var p87p = fun.mirrorpoint(p87, p40, p40p);
            var p88p = fun.mirrorpoint(p88, p40, p40p);
            var p92 = fun.Inters(p54, fun.Polar(p54, 217 * pi / 180, 1), p56, p56p);
            var p93 = fun.Inters(p92, fun.Polar(p92, 227 * pi / 180, 1), p58, p58p);
            var p94 = fun.Inters(p93, fun.Polar(p93, 210 * pi / 180, 1), p60, p60p);
            var p95 = fun.Inters(p94, fun.Polar(p94, 210 * pi / 180, 1), p62, p62p);
            var p96 = fun.Inters(p95, fun.Polar(p95, 201 * pi / 180, 1), p64, p64p);
            var p97 = fun.Inters(p96, fun.Polar(p96, 201 * pi / 180, 1), p66, p66p);
            var p98 = fun.Inters(p97, fun.Polar(p97, 201 * pi / 180, 1), p68, p68p);
            var p99 = fun.Inters(p98, fun.Polar(p98, 214 * pi / 180, 1), p70, p70p);
            var p100 = fun.Inters(p99, fun.Polar(p99, 210 * pi / 180, 1), p72, p72p);
            var p101 = fun.Inters(p100, fun.Polar(p100, 205 * pi / 180, 1), p74, p74p);
            var p102 = fun.Inters(p101, fun.Polar(p101, 210 * pi / 180, 1), p76, p76p);
            var p103 = fun.Inters(p102, fun.Polar(p102, 210 * pi / 180, 1), p78, p78p);
            var p104 = fun.Inters(p40, p40p, p80, p80p);
            var p105 = fun.Inters(p104, fun.Polar(p104, 208 * pi / 180, 1), p82, p82p);
            var p106 = fun.Inters(p105, fun.Polar(p105, 202 * pi / 180, 1), p84, p84p);
            var p107 = fun.Inters(p106, fun.Polar(p106, 224 * pi / 180, 1), p86, p86p);
            var p108 = fun.Inters(p107, fun.Polar(p107, 210 * pi / 180, 1), p87, p87p);
            var p109 = fun.Inters(p108, fun.Polar(p108, 188 * pi / 180, 1), p88, p88p);
            var p110 = new Vector2(p43.X, p40.Y + 3.1 / 27.74 * td1);
            var p111 = fun.Inters(p110, fun.Polar(p110, 135 * pi / 180, 1), p44, p44p);
            var p112 = fun.Inters(p111, fun.Polar(p111, 207 * pi / 180, 1), p46, p46p);
            var p113 = fun.Inters(p112, fun.Polar(p112, 200 * pi / 180, 1), p48, p48p);
            var p114 = fun.Inters(p113, fun.Polar(p113, 200 * pi / 180, 1), p50, p50p);
            var p115 = fun.Inters(p114, fun.Polar(p114, 205 * pi / 180, 1), p52, p52p);
            var p116 = fun.Inters(p115, fun.Polar(p115, 198 * pi / 180, 1), p54, p54p);
            var p117 = fun.Inters(p40, p40p, p56, p56p);
            var p118 = fun.Inters(p117, fun.Polar(p117, 206 * pi / 180, 1), p58, p58p);
            var p119 = fun.Inters(p118, fun.Polar(p118, 213 * pi / 180, 1), p60, p60p);
            var p120 = fun.Inters(p119, fun.Polar(p119, 199 * pi / 180, 1), p62, p62p);
            var p121 = fun.Inters(p120, fun.Polar(p120, 215 * pi / 180, 1), p64, p64p);
            var p122 = fun.Inters(p121, fun.Polar(p121, 187 * pi / 180, 1), p66, p66p);
            var p123 = fun.Inters(p122, fun.Polar(p122, 213 * pi / 180, 1), p68, p68p);
            var p124 = fun.Inters(p123, fun.Polar(p123, 219 * pi / 180, 1), p70, p70p);
            var p125 = fun.Inters(p124, fun.Polar(p124, 180 * pi / 180, 1), p72, p72p);
            var p126 = fun.Inters(p125, fun.Polar(p125, 224 * pi / 180, 1), p74, p74p);
            var p127 = fun.Inters(p126, fun.Polar(p126, 209 * pi / 180, 1), p76, p76p);
            var p128 = fun.Inters(p127, fun.Polar(p127, 204 * pi / 180, 1), p78, p78p);
            var p129 = fun.Inters(p128, fun.Polar(p128, 181 * pi / 180, 1), p80, p80p);
            var p130 = new Vector2(p43.X, p40.Y - 5.66 / 27.74 * td1);
            var p131 = fun.Inters(p130, fun.Polar(p130, 196 * pi / 180, 1), p44, p44p);
            var p132 = fun.Inters(p131, fun.Polar(p131, 200 * pi / 180, 1), p46, p46p);
            var p133 = fun.Inters(p132, fun.Polar(p132, 200 * pi / 180, 1), p48, p48p);
            var p134 = fun.Inters(p133, fun.Polar(p133, 211 * pi / 180, 1), p50, p50p);
            var p135 = fun.Inters(p134, fun.Polar(p134, 203 * pi / 180, 1), p52, p52p);
            var p136 = fun.Inters(p135, fun.Polar(p135, 197 * pi / 180, 1), p54, p54p);
            var p137 = fun.Inters(p136, fun.Polar(p136, 197 * pi / 180, 1), p56, p56p);
            var p138 = fun.Inters(p137, fun.Polar(p137, 210 * pi / 180, 1), p58, p58p);
            var p139 = fun.Inters(p138, fun.Polar(p138, 191 * pi / 180, 1), p60, p60p);
            var p140 = p62p;
            var p141 = new Vector2(p40.X - 100, p40.Y + 40);
            var p142 = new Vector2(p40.X + 70, p40.Y + 40);
            var p143 = new Vector2(p40.X + 70, p40.Y - 60);
            var p144 = new Vector2(p40.X - 100, p40.Y - 60);
            var p145 = fun.Polar(p81p, -90 * pi / 180, 25);
            var p146 = fun.Polar(p81p, -90 * pi / 180, 35);
            var p147 = fun.Polar(p81p, -90 * pi / 180, 37);
            var p148 = fun.Polar(p85, fun.CalAngle(p85, p43), fun.CalDistance(p85, p43) * 2);
            var p149 = fun.Polar(p85, fun.CalAngle(p85, p43), fun.CalDistance(p85, p43) * 1.5);


            var polyline12 = Pus.AddPointsToLwPolyLine(p42, p41, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85, p88, p88p, p85p, p84p, p83p, p82p, p81p, p80p, p79p, p78p, p77p, p76p, p75p, p74p, p73p, p72p, p71p, p70p, p69p, p68p, p67p, p66p, p65p, p64p, p63p, p62p, p61p, p60p, p59p, p58p, p57p, p56p, p55p, p54p, p53p, p52p, p51p, p50p, p49p, p48p, p47p, p46p, p45p, p44p, p43p, p41p, p42p); ;
            var polyline13 = Pus.AddPointsToLwPolyLine(p84, p91, p90, p89, p109, p108, p107, p106, p105, p104, p103, p102, p101, p100, p99, p98, p97, p96, p95, p94, p93, p92, p54);
            var polyline14 = Pus.AddPointsToLwPolyLine(p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125, p126, p127, p128, p129, p82p);
            var polyline15 = Pus.AddPointsToLwPolyLine(p130, p131, p132, p133, p134, p135, p136, p137, p138, p139, p140);
            //dxf.AddEntity(polyline12);
            //dxf.AddEntity(polyline13);
            //dxf.AddEntity(polyline14);
            //dxf.AddEntity(polyline15);

            fun.PolyFill(dxf, polyline12, 0.2, contour);
            fun.PolyFill(dxf, polyline13, 0.2, contour);
            fun.PolyFill(dxf, polyline14, 0.2, contour);
            fun.PolyFill(dxf, polyline15, 0.2, contour);


            var line85 = new Line(p87, p90);
            var line86 = new Line(p86, p91);
            var line87 = new Line(p108, p87p);
            var line88 = new Line(p107, p86p);
            var line89 = new Line(p106, p84p);
            var line90 = new Line(p105, p82p);
            var line91 = new Line(p104, p129);
            var line92 = new Line(p103, p128);
            var line93 = new Line(p102, p127);
            var line94 = new Line(p101, p126);
            var line95 = new Line(p100, p125);
            var line96 = new Line(p99, p124);
            var line97 = new Line(p98, p123);
            var line98 = new Line(p97, p122);
            var line99 = new Line(p96, p121);
            var line100 = new Line(p95, p120);
            var line101 = new Line(p94, p119);
            var line102 = new Line(p93, p118);
            var line103 = new Line(p92, p117);
            var line104 = new Line(p54, p116);
            var line105 = new Line(p52, p115);
            var line106 = new Line(p50, p114);
            var line107 = new Line(p48, p113);
            var line108 = new Line(p46, p112);
            var line109 = new Line(p44, p111);
            var line110 = new Line(p43, p43p);
            var line111 = new Line(p131, p44p);
            var line112 = new Line(p132, p46p);
            var line113 = new Line(p133, p48p);
            var line114 = new Line(p134, p50p);
            var line115 = new Line(p135, p52p);
            var line116 = new Line(p136, p54p);
            var line117 = new Line(p137, p56p);
            var line118 = new Line(p138, p58p);
            var line119 = new Line(p139, p60p);
            var line120 = new Line(p41, p41p);

            fun.drawBline(dxf, line85, 0.2, contour);
            fun.drawBline(dxf, line86, 0.2, contour);
            fun.drawBline(dxf, line87, 0.2, contour);
            fun.drawBline(dxf, line88, 0.2, contour);
            fun.drawBline(dxf, line89, 0.2, contour);
            fun.drawBline(dxf, line90, 0.2, contour);
            fun.drawBline(dxf, line91, 0.2, contour);
            fun.drawBline(dxf, line92, 0.2, contour);
            fun.drawBline(dxf, line93, 0.2, contour);
            fun.drawBline(dxf, line94, 0.2, contour);
            fun.drawBline(dxf, line95, 0.2, contour);
            fun.drawBline(dxf, line96, 0.2, contour);
            fun.drawBline(dxf, line97, 0.2, contour);
            fun.drawBline(dxf, line98, 0.2, contour);
            fun.drawBline(dxf, line99, 0.2, contour);
            fun.drawBline(dxf, line100, 0.2, contour);
            fun.drawBline(dxf, line101, 0.2, contour);
            fun.drawBline(dxf, line102, 0.2, contour);
            fun.drawBline(dxf, line103, 0.2, contour);
            fun.drawBline(dxf, line104, 0.2, contour);
            fun.drawBline(dxf, line105, 0.2, contour);
            fun.drawBline(dxf, line106, 0.2, contour);
            fun.drawBline(dxf, line107, 0.2, contour);
            fun.drawBline(dxf, line108, 0.2, contour);
            fun.drawBline(dxf, line109, 0.2, contour);
            fun.drawBline(dxf, line110, 0.2, contour);
            fun.drawBline(dxf, line111, 0.2, contour);
            fun.drawBline(dxf, line112, 0.2, contour);
            fun.drawBline(dxf, line113, 0.2, contour);
            fun.drawBline(dxf, line114, 0.2, contour);
            fun.drawBline(dxf, line115, 0.2, contour);
            fun.drawBline(dxf, line116, 0.2, contour);
            fun.drawBline(dxf, line117, 0.2, contour);
            fun.drawBline(dxf, line118, 0.2, contour);
            fun.drawBline(dxf, line119, 0.2, contour);
            fun.drawBline(dxf, line120, 0.2, contour);


            //dxf.AddEntity(new EntityObject[] { line85, line86, line87, line88, line89, line90, line91, line92, line93, line94, line95, line96, line97, line98, line99, line100, line101, line102, line103, line104, line105, line106, line107, line108, line109, line110, line111, line112, line113, line114, line115, line116, line117, line118, line119 });


            Line line121 = new Line(p40p, fun.Polar(p40, 0, 41));
            line121.Layer = centre;
            line121.Lineweight = Lineweight.W25;
            line121.Linetype = Linetype.DashDot;
            dxf.AddEntity(line121);


            LwPolyline Arc00 = new LwPolyline();
            Arc00.Vertexes.Add(new LwPolylineVertex(p110));
            Arc00.Vertexes.Add(new LwPolylineVertex(p40));
            Arc00.Vertexes.Add(new LwPolylineVertex(p130));
            Arc00.Vertexes[0].Bulge = Math.Tan(-53 * pi / 180 / 4);
            Arc00.Vertexes[1].Bulge = Math.Tan(-56 * pi / 180 / 4);
            fun.PolyFill(dxf, Arc00, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(p42));
            Arc1.Vertexes.Add(new LwPolylineVertex(new Vector2(p42.X, p40.Y)));
            Arc1.Vertexes.Add(new LwPolylineVertex(p42p));
            Arc1.Vertexes[0].Bulge = Math.Tan(-60 * pi / 180 / 4);
            Arc1.Vertexes[1].Bulge = Math.Tan(60 * pi / 180 / 4);
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(p141));
            Arc2.Vertexes.Add(new LwPolylineVertex(p142));
            Arc2.Vertexes.Add(new LwPolylineVertex(p143));
            Arc2.Vertexes.Add(new LwPolylineVertex(p144));
            Arc2.Vertexes.Add(new LwPolylineVertex(p141));
            Arc2.Layer = refin;
            Arc2.Lineweight = Lineweight.W35;
            Arc2.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc2);


            fun.Axis(dxf, new Vector2(p88.X, p40.Y), 0, -90, "", "", "", 1, height, 0);

            fun.dimrot1(dxf, p88, p88p, 90, offset * 0.5, 0, height, arrowsize, exline, "TCPD", "", "");
            fun.dimrot1(dxf, p81, p81p, 90, offset * 1.5, 0, height, arrowsize, exline, "TD", "", "");
            fun.dimrot1(dxf, p88p, p81p, 180, offset * 0.8, 0, height, arrowsize, exline, "TCL", "", "");

            var line122 = new Line(p81p, p147);
            dxf.AddEntity(line122);
            var line123 = new Line(p85, p148);
            dxf.AddEntity(line123);

            fun.jt(dxf, p145, 0, 20, 2, "");
            fun.jt(dxf, p146, 0, 20, 2, "");



            Text text6 = new Text("LF", fun.Polar(p145, 5 * pi / 180, 12), height, 0);
            dxf.AddEntity(text6);
            Text text7 = new Text("LTA", fun.Polar(p146, 5 * pi / 180, 12), height, 0);
            dxf.AddEntity(text7);

            fun.jt(dxf, p149, 160, 25, height, "TG");
            fun.jt0(dxf, new Vector2(p88.X, p40.Y), 105, 23, height, "CIP");
            fun.jt0(dxf, p81p, 315, 9, height, "CRP");

            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard29014_3_F5(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            var scale = 2;
            var oal = 47.0 * scale;//总长
            var dconms = 4 * scale;//柄径
            var drvl = 4 * scale;
            var thl = 17.57 / 2 * scale;
            var td = 12.34 / 2 * scale;
            var tcpd = 5.045 * scale;
            var l3 = oal - thl;//柄部长度
            //柄部

            var v1 = new Vector2(0, 0);
            var v0 = fun.Polar(v1, pi, oal);
            var v2 = fun.Polar(v1, 90 * pi / 180, dconms / 2);
            var v3 = fun.Polar(v2, pi, 0.8 / 3.31 * dconms / 2);
            var v8 = fun.Polar(v2, -90 * pi / 180, 1.48 / 3.31 * dconms / 2);
            var v9 = fun.Polar(v8, pi, drvl);
            var v6 = fun.Polar(v2, pi, fun.CalDistance(v8, v9));
            var v5 = fun.Polar(v6, 0, fun.CalDistance(v3, v2));
            var v4 = fun.mirrorpoint(v3, v8, v9);
            var v7 = fun.mirrorpoint(v5, v8, v9);
            var v10 = fun.Polar(v2, pi, l3);
            var v11 = fun.Polar(v10, 90 * pi / 180, (tcpd - dconms) / 2.0);
            var v3p = fun.mirrorpoint(v3, v0, v1);
            var v4p = fun.mirrorpoint(v4, v0, v1);
            var v5p = fun.mirrorpoint(v5, v0, v1);
            var v6p = fun.mirrorpoint(v6, v0, v1);
            var v7p = fun.mirrorpoint(v7, v0, v1);
            var v8p = fun.mirrorpoint(v8, v0, v1);
            var v9p = fun.mirrorpoint(v9, v0, v1);
            var v10p = fun.mirrorpoint(v10, v0, v1);
            var v11p = fun.mirrorpoint(v11, v0, v1);



            var arc1 = fun.DrawArc3(v4, v8, v3);
            var arc2 = fun.DrawArc3(v5, v9, v7);
            var arc3 = fun.DrawArc3(v3p, v8p, v4p);
            var arc4 = fun.DrawArc3(v7p, v9p, v5p);
            var line1 = new Line(v8, v8p);
            var polyline1 = Pus.AddPointsToLwPolyLine(v7, v4, v4p, v7p, v7);
            var polyline2 = Pus.AddPointsToLwPolyLine(v3, v5, v6);
            var polyline3 = Pus.AddPointsToLwPolyLine(v3p, v5p, v6p);

            var v12 = new Vector2(v11.X - 0.59 / 17.57 * thl, v11.Y + 1.13 / 12.34 * td);
            var v13 = new Vector2(v12.X - 0.45 / 17.57 * thl, v12.Y - 0.78 / 12.34 * td);
            var v14 = fun.Polar(v12, pi, 0.9 / 17.57 * thl);
            var v15 = fun.Polar(v13, pi, 0.9 / 17.57 * thl);
            var v16 = fun.Polar(v14, pi, 0.9 / 17.57 * thl);
            var v17 = fun.Polar(v15, pi, 0.9 / 17.57 * thl);
            var v18 = fun.Polar(v16, pi, 0.9 / 17.57 * thl);
            var v19 = fun.Polar(v17, pi, 0.9 / 17.57 * thl);
            var v20 = fun.Polar(v18, pi, 0.9 / 17.57 * thl);
            var v21 = fun.Polar(v19, pi, 0.9 / 17.57 * thl);
            var v22 = fun.Polar(v20, pi, 0.9 / 17.57 * thl);
            var v23 = fun.Polar(v21, pi, 0.9 / 17.57 * thl);
            var v24 = fun.Polar(v22, pi, 0.9 / 17.57 * thl);
            var v25 = fun.Polar(v23, pi, 0.9 / 17.57 * thl);
            var v26 = fun.Polar(v24, pi, 0.9 / 17.57 * thl);
            var v27 = fun.Polar(v25, pi, 0.9 / 17.57 * thl);
            var v28 = fun.Polar(v26, pi, 0.9 / 17.57 * thl);
            var v29 = fun.Polar(v27, pi, 0.9 / 17.57 * thl);
            var v30 = fun.Polar(v28, pi, 0.9 / 17.57 * thl);
            var v31 = fun.Polar(v29, pi, 0.9 / 17.57 * thl);
            var v32 = fun.Polar(v30, pi, 0.9 / 17.57 * thl);
            var v33 = fun.Polar(v31, pi, 0.9 / 17.57 * thl);
            var v34 = fun.Polar(v32, pi, 0.9 / 17.57 * thl);
            var v35 = fun.Polar(v33, pi, 0.9 / 17.57 * thl);
            var v36 = fun.Polar(v34, pi, 0.9 / 17.57 * thl);
            var v37 = fun.Polar(v35, pi, 0.9 / 17.57 * thl);
            var v38 = fun.Polar(v36, pi, 0.9 / 17.57 * thl);
            var v39 = fun.Polar(v37, pi, 0.9 / 17.57 * thl);
            var v40 = fun.Polar(v38, pi, 0.9 / 17.57 * thl);
            var v41 = fun.Polar(v39, pi, 0.9 / 17.57 * thl);
            var v42 = fun.Polar(v40, pi, 0.9 / 17.57 * thl);
            var v43 = fun.Polar(v41, pi, 0.9 / 17.57 * thl);
            var v44 = fun.Polar(v42, pi, 0.9 / 17.57 * thl);
            var v45 = fun.Polar(v43, pi, 0.9 / 17.57 * thl);
            var v46 = fun.Polar(v44, pi, 0.9 / 17.57 * thl);
            var v47 = fun.Polar(v45, pi, 0.9 / 17.57 * thl);
            var v51 = new Vector2(v11.X - thl, v11.Y);
            var v48 = fun.Inters(v46, v51, v47, fun.Polar(v47, 154 * pi / 180, 1));
            var v49 = new Vector2(v48.X - 0.33 / 17.57 * thl, v48.Y - 0.57 / 12.34 * td);
            var v50 = fun.Inters(v46, v51, v49, fun.Polar(v49, 158 * pi / 180, 1));
            var v12p = fun.mirrorpoint(v12, v1, v0);
            var v13p = fun.mirrorpoint(v13, v1, v0);
            var v14p = fun.mirrorpoint(v14, v1, v0);
            var v15p = fun.mirrorpoint(v15, v1, v0);
            var v16p = fun.mirrorpoint(v16, v1, v0);
            var v17p = fun.mirrorpoint(v17, v1, v0);
            var v18p = fun.mirrorpoint(v18, v1, v0);
            var v19p = fun.mirrorpoint(v19, v1, v0);
            var v20p = fun.mirrorpoint(v20, v1, v0);
            var v21p = fun.mirrorpoint(v21, v1, v0);
            var v22p = fun.mirrorpoint(v22, v1, v0);
            var v23p = fun.mirrorpoint(v23, v1, v0);
            var v24p = fun.mirrorpoint(v24, v1, v0);
            var v25p = fun.mirrorpoint(v25, v1, v0);
            var v26p = fun.mirrorpoint(v26, v1, v0);
            var v27p = fun.mirrorpoint(v27, v1, v0);
            var v28p = fun.mirrorpoint(v28, v1, v0);
            var v29p = fun.mirrorpoint(v29, v1, v0);
            var v30p = fun.mirrorpoint(v30, v1, v0);
            var v31p = fun.mirrorpoint(v31, v1, v0);
            var v32p = fun.mirrorpoint(v32, v1, v0);
            var v33p = fun.mirrorpoint(v33, v1, v0);
            var v34p = fun.mirrorpoint(v34, v1, v0);
            var v35p = fun.mirrorpoint(v35, v1, v0);
            var v36p = fun.mirrorpoint(v36, v1, v0);
            var v37p = fun.mirrorpoint(v37, v1, v0);
            var v38p = fun.mirrorpoint(v38, v1, v0);
            var v39p = fun.mirrorpoint(v39, v1, v0);
            var v40p = fun.mirrorpoint(v40, v1, v0);
            var v41p = fun.mirrorpoint(v41, v1, v0);
            var v42p = fun.mirrorpoint(v42, v1, v0);
            var v43p = fun.mirrorpoint(v43, v1, v0);
            var v44p = fun.mirrorpoint(v44, v1, v0);
            var v45p = fun.mirrorpoint(v45, v1, v0);
            var v46p = fun.mirrorpoint(v46, v1, v0);
            var v47p = fun.mirrorpoint(v47, v1, v0);
            var v48p = fun.mirrorpoint(v48, v1, v0);
            var v49p = fun.mirrorpoint(v49, v1, v0);
            var v50p = fun.mirrorpoint(v50, v1, v0);
            var v51p = fun.mirrorpoint(v51, v1, v0);
            var p52 = new Vector2(v51.X, v1.Y + 1.07 / 10.09 * tcpd);
            var v92 = new Vector2(v11.X, p52.Y);
            var p52p = fun.mirrorpoint(p52, v1, v0);
            var v92p = fun.mirrorpoint(v92, v1, v0);
            var v52 = fun.Inters(v51, v51p, v50, fun.Polar(v50, fun.CalAngle(v44, v46p), 1));
            var v53 = fun.Inters(p52, v92, v49, fun.Polar(v49, fun.CalAngle(v44, v46p), 1));
            var v54 = fun.Inters(v48, v50p, p52, v92);
            var v55 = fun.Inters(v47, v49p, p52, v92);
            var v56 = fun.Inters(v46, v48p, p52, v92);
            var v57 = fun.Inters(v45, v47p, p52, v92);
            var v58 = fun.Inters(v44, v46p, p52, v92);
            var v59 = fun.Inters(v43, v45p, p52, v92);
            var v60 = fun.Inters(v42, v44p, p52, v92);
            var v61 = fun.Inters(v41, v43p, p52, v92);
            var v62 = fun.Inters(v40, v42p, p52, v92);
            var v63 = fun.Inters(v39, v41p, p52, v92);
            var v64 = fun.Inters(v38, v40p, p52, v92);
            var v65 = fun.Inters(v37, v39p, p52, v92);
            var v66 = fun.Inters(v36, v38p, p52, v92);
            var v67 = fun.Inters(v35, v37p, p52, v92);
            var v68 = fun.Inters(v34, v36p, p52, v92);
            var v69 = fun.Inters(v33, v35p, p52, v92);
            var v70 = fun.Inters(v32, v34p, p52, v92);
            var v71 = fun.Inters(v31, v33p, p52, v92);
            var v72 = fun.Inters(v30, v32p, p52, v92);
            var v73 = fun.Inters(v29, v31p, p52, v92);
            var v74 = fun.Inters(v28, v30p, p52, v92);
            var v75 = fun.Inters(v27, v29p, p52, v92);
            var v76 = fun.Inters(v26, v28p, p52, v92);
            var v77 = fun.Inters(v25, v27p, p52, v92);
            var v78 = fun.Inters(v24, v26p, p52, v92);
            var v79 = fun.Inters(v23, v25p, p52, v92);
            var v80 = fun.Inters(v22, v24p, p52, v92);
            var v81 = fun.Inters(v21, v23p, p52, v92);
            var v82 = fun.Inters(v20, v22p, p52, v92);
            var v83 = fun.Inters(v19, v21p, p52, v92);
            var v84 = fun.Inters(v18, v20p, p52, v92);
            var v85 = fun.Inters(v17, v19p, p52, v92);
            var v86 = fun.Inters(v16, v18p, p52, v92);
            var v87 = fun.Inters(v15, v17p, p52, v92);
            var v88 = fun.Inters(v14, v16p, p52, v92);
            var v89 = fun.Inters(v13, v15p, p52, v92);
            var v90 = fun.Inters(v12, v14p, p52, v92);
            var v91 = fun.Inters(v11, v13p, p52, v92);
            var v93 = fun.mirrorpoint(v92, v0, v1);
            var v135 = fun.mirrorpoint(p52, v0, v1);
            var v94 = fun.Inters(v135, v93, v12p, fun.Polar(v12p, fun.CalAngle(v46p, v44), 1));
            var v95 = fun.Inters(v93, v135, v13p, v11);
            var v96 = fun.Inters(v93, v135, v14p, v12);
            var v97 = fun.Inters(v93, v135, v15p, v13);
            var v98 = fun.Inters(v93, v135, v16p, v14);
            var v99 = fun.Inters(v93, v135, v17p, v15);
            var v100 = fun.Inters(v93, v135, v18p, v16);
            var v101 = fun.Inters(v93, v135, v19p, v17);
            var v102 = fun.Inters(v93, v135, v20p, v18);
            var v103 = fun.Inters(v93, v135, v21p, v19);
            var v104 = fun.Inters(v93, v135, v22p, v20);
            var v105 = fun.Inters(v93, v135, v23p, v21);
            var v106 = fun.Inters(v93, v135, v24p, v22);
            var v107 = fun.Inters(v93, v135, v25p, v23);
            var v108 = fun.Inters(v93, v135, v26p, v24);
            var v109 = fun.Inters(v93, v135, v27p, v25);
            var v110 = fun.Inters(v93, v135, v28p, v26);
            var v111 = fun.Inters(v93, v135, v29p, v27);
            var v112 = fun.Inters(v93, v135, v30p, v28);
            var v113 = fun.Inters(v93, v135, v31p, v29);
            var v114 = fun.Inters(v93, v135, v32p, v30);
            var v115 = fun.Inters(v93, v135, v33p, v31);
            var v116 = fun.Inters(v93, v135, v34p, v32);
            var v117 = fun.Inters(v93, v135, v35p, v33);
            var v118 = fun.Inters(v93, v135, v36p, v34);
            var v119 = fun.Inters(v93, v135, v37p, v35);
            var v120 = fun.Inters(v93, v135, v38p, v36);
            var v121 = fun.Inters(v93, v135, v39p, v37);
            var v122 = fun.Inters(v93, v135, v40p, v38);
            var v123 = fun.Inters(v93, v135, v41p, v39);
            var v124 = fun.Inters(v93, v135, v42p, v40);
            var v125 = fun.Inters(v93, v135, v43p, v41);
            var v126 = fun.Inters(v93, v135, v44p, v42);
            var v127 = fun.Inters(v93, v135, v45p, v43);
            var v128 = fun.Inters(v93, v135, v46p, v44);
            var v129 = fun.Inters(v93, v135, v47p, v45);
            var v130 = fun.Inters(v93, v135, v48p, v46);
            var v131 = fun.Inters(v93, v135, v49p, v47);
            var v132 = fun.Inters(v93, v135, v50p, v48);
            var v133 = fun.Inters(v93, v135, v51p, v49);
            var v134 = fun.Inters(v51, v51p, v49, v53);
            var v136 = new Vector2(v10.X + (tcpd - dconms), v1.Y);
            var v137 = fun.Polar(v0, pi, 70);
            var v138 = fun.Polar(v137, pi, 2);
            var v138p = fun.Polar(v138, pi, 2.5);
            var v139 = fun.Polar(v137, 0, 16);
            var v140 = fun.Polar(v137, 90 * pi / 180, 3.2);
            var v141 = fun.Polar(v137, -90 * pi / 180, 3.2);
            var v142 = fun.Polar(v137, 90 * pi / 180, 9.5);
            var v143 = fun.Polar(v142, 90 * pi / 180, 3.5);
            var v144 = fun.Polar(v142, 0, 2);
            var v145 = fun.Polar(v144, 0, 2.4);
            var v146 = fun.Polar(v145, 0, 3.7);
            var v147 = fun.Polar(v146, 0, 2.4);
            var v148 = fun.Polar(v147, 0, 2.7);
            var v149 = fun.Polar(v144, 85 * pi / 180, 3.3);
            var v150 = fun.Polar(v145, 85 * pi / 180, 3.3);
            var v151 = fun.Polar(v145, 58 * pi / 180, 4.86);
            var v152 = fun.Polar(v146, 85 * pi / 180, 3.3);
            var v153 = fun.Polar(v147, 85 * pi / 180, 3.3);
            var v154 = fun.Polar(v147, 55 * pi / 180, 4);
            var v155 = fun.Polar(v137, 23 * pi / 180, 13.5);
            var v156 = fun.Polar(v137, 0, 13.8);
            var v157 = fun.Polar(v137, 336 * pi / 180, 13.3);
            var v158 = fun.mirrorpoint(v142, v137, v139);
            var v166 = fun.mirrorpoint(v148, v137, v139);
            var v159 = fun.Inters(v149, v144, v158, v166);
            var v160 = fun.mirrorpoint(v143, v137, v139);
            var v161 = fun.Inters(v137, v160, v159, fun.Polar(v159, 263 * pi / 180, 1));
            var v162 = fun.Inters(v150, v145, v158, v166);
            var v163 = fun.Inters(v152, v146, v158, v166);
            var v164 = fun.Inters(v153, v147, v158, v166);
            var v165 = fun.Polar(v164, 0, fun.CalDistance(v162, v163));
            var v167 = fun.Polar(v162, fun.CalAngle(v149, v144), 3.3);
            var v168 = fun.Polar(v167, 22 * pi / 180, 1.9);
            var v169 = fun.Polar(v163, fun.CalAngle(v149, v144), 3.3);
            var v170 = fun.Polar(v164, fun.CalAngle(v149, v144), 3.3);
            var v171 = fun.Polar(v165, fun.CalAngle(v149, v144), 3.3);
            var v172 = fun.Polar(v0, 263 * pi / 180, 130);
            var v173 = fun.Polar(v172, 90 * pi / 180, 6.68);
            var v174 = fun.Polar(v173, 0, 0.58);
            var v175 = fun.Polar(v173, 0, 1.16);
            var v176 = fun.Polar(v175, 64 * pi / 180, 1.18);
            var v177 = fun.Polar(v176, 340 * pi / 180, 0.77);
            var v178 = fun.Polar(v177, 60 * pi / 180, 1.54);
            var v179 = fun.Polar(v177, 4 * pi / 180, 1.714);
            var v180 = fun.Polar(v178, 4 * pi / 180, 1.714);
            var v181 = fun.Polar(v179, 4 * pi / 180, 1.714);
            var v182 = fun.Polar(v180, 4 * pi / 180, 1.714);
            var v183 = fun.Polar(v181, 4 * pi / 180, 1.714);
            var v184 = fun.Polar(v182, 4 * pi / 180, 1.714);
            var v185 = fun.Polar(v183, 4 * pi / 180, 1.714);
            var v186 = fun.Polar(v184, 4 * pi / 180, 1.714);
            var v187 = fun.Polar(v185, 4 * pi / 180, 1.714);
            var v188 = fun.Polar(v186, 4 * pi / 180, 1.714);
            var v189 = fun.Polar(v187, 4 * pi / 180, 1.714);
            var v190 = fun.Polar(v188, 4 * pi / 180, 1.714);
            var v191 = fun.Polar(v189, 4 * pi / 180, 1.714);
            var v192 = fun.Polar(v190, 4 * pi / 180, 1.714);
            var v193 = fun.Polar(v191, 4 * pi / 180, 1.714);
            var v194 = fun.Polar(v192, 4 * pi / 180, 1.714);
            var v195 = fun.Polar(v193, 4 * pi / 180, 1.714);
            var v196 = fun.Polar(v194, 4 * pi / 180, 1.714);
            var v197 = fun.Polar(v195, 4 * pi / 180, 1.714);
            var v198 = fun.Polar(v196, 4 * pi / 180, 1.714);
            var v199 = fun.Polar(v197, 4 * pi / 180, 1.714);
            var v200 = fun.Polar(v198, 4 * pi / 180, 1.714);
            var v201 = fun.Polar(v199, 4 * pi / 180, 1.714);
            var v202 = fun.Polar(v200, 4 * pi / 180, 1.714);
            var v203 = fun.Polar(v201, 4 * pi / 180, 1.714);
            var v204 = fun.Polar(v202, 4 * pi / 180, 1.714);
            var v205 = fun.Polar(v203, 4 * pi / 180, 1.714);
            var v206 = fun.Polar(v204, 4 * pi / 180, 1.714);
            var v207 = fun.Polar(v205, 4 * pi / 180, 1.714);
            var v208 = fun.Polar(v206, 4 * pi / 180, 1.714);
            var v209 = fun.Polar(v207, 4 * pi / 180, 1.714);
            var v210 = fun.Polar(v209, -90 * pi / 180, 2.56);
            var v211 = fun.Polar(v210, 0, 23);
            var v251 = fun.Polar(v172, 0, 33);
            var v172p = fun.mirrorpoint(v172, v172, v251);
            var v173p = fun.mirrorpoint(v173, v172, v251);
            var v174p = fun.mirrorpoint(v174, v172, v251);
            var v175p = fun.mirrorpoint(v175, v172, v251);
            var v176p = fun.mirrorpoint(v176, v172, v251);
            var v177p = fun.mirrorpoint(v177, v172, v251);
            var v178p = fun.mirrorpoint(v178, v172, v251);
            var v179p = fun.mirrorpoint(v179, v172, v251);
            var v180p = fun.mirrorpoint(v180, v172, v251);
            var v181p = fun.mirrorpoint(v181, v172, v251);
            var v182p = fun.mirrorpoint(v182, v172, v251);
            var v183p = fun.mirrorpoint(v183, v172, v251);
            var v184p = fun.mirrorpoint(v184, v172, v251);
            var v185p = fun.mirrorpoint(v185, v172, v251);
            var v186p = fun.mirrorpoint(v186, v172, v251);
            var v187p = fun.mirrorpoint(v187, v172, v251);
            var v188p = fun.mirrorpoint(v188, v172, v251);
            var v189p = fun.mirrorpoint(v189, v172, v251);
            var v190p = fun.mirrorpoint(v190, v172, v251);
            var v191p = fun.mirrorpoint(v191, v172, v251);
            var v192p = fun.mirrorpoint(v192, v172, v251);
            var v193p = fun.mirrorpoint(v193, v172, v251);
            var v194p = fun.mirrorpoint(v194, v172, v251);
            var v195p = fun.mirrorpoint(v195, v172, v251);
            var v196p = fun.mirrorpoint(v196, v172, v251);
            var v197p = fun.mirrorpoint(v197, v172, v251);
            var v198p = fun.mirrorpoint(v198, v172, v251);
            var v199p = fun.mirrorpoint(v199, v172, v251);
            var v200p = fun.mirrorpoint(v200, v172, v251);
            var v201p = fun.mirrorpoint(v201, v172, v251);
            var v202p = fun.mirrorpoint(v202, v172, v251);
            var v203p = fun.mirrorpoint(v203, v172, v251);
            var v204p = fun.mirrorpoint(v204, v172, v251);
            var v205p = fun.mirrorpoint(v205, v172, v251);
            var v206p = fun.mirrorpoint(v206, v172, v251);
            var v207p = fun.mirrorpoint(v207, v172, v251);
            var v208p = fun.mirrorpoint(v208, v172, v251);
            var v209p = fun.mirrorpoint(v209, v172, v251);
            var v210p = fun.mirrorpoint(v210, v172, v251);
            var v211p = fun.mirrorpoint(v211, v172, v251);
            var v212 = fun.Polar(v172, 90 * pi / 180, 1.73);
            var v213 = new Vector2(v209.X, v212.Y);
            var v252 = new Vector2(v211.X, v172.Y);
            var v253 = fun.mirrorpoint(v212, v172, v251);
            var v254 = fun.mirrorpoint(v213, v172, v251);
            var v214 = fun.Inters(v212, v213, v174, fun.Polar(v174, fun.CalAngle(v180, v178p), 1));
            var v215 = fun.Inters(v212, v213, v175, fun.Polar(v175, fun.CalAngle(v180, v178p), 1));
            var v216 = fun.Inters(v212, v213, v176, fun.Polar(v176, fun.CalAngle(v180, v178p), 1));
            var v217 = fun.Inters(v212, v213, v177, v175p);
            var v218 = fun.Inters(v212, v213, v178, v176p);
            var v219 = fun.Inters(v212, v213, v179, v177p);
            var v220 = fun.Inters(v212, v213, v180, v178p);
            var v221 = fun.Inters(v212, v213, v181, v179p);
            var v222 = fun.Inters(v212, v213, v182, v180p);
            var v223 = fun.Inters(v212, v213, v183, v181p);
            var v224 = fun.Inters(v212, v213, v184, v182p);
            var v225 = fun.Inters(v212, v213, v185, v183p);
            var v226 = fun.Inters(v212, v213, v186, v184p);
            var v227 = fun.Inters(v212, v213, v187, v185p);
            var v228 = fun.Inters(v212, v213, v188, v186p);
            var v229 = fun.Inters(v212, v213, v189, v187p);
            var v230 = fun.Inters(v212, v213, v190, v188p);
            var v231 = fun.Inters(v212, v213, v191, v189p);
            var v232 = fun.Inters(v212, v213, v192, v190p);
            var v233 = fun.Inters(v212, v213, v193, v191p);
            var v234 = fun.Inters(v212, v213, v194, v192p);
            var v235 = fun.Inters(v212, v213, v195, v193p);
            var v236 = fun.Inters(v212, v213, v196, v194p);
            var v237 = fun.Inters(v212, v213, v197, v195p);
            var v238 = fun.Inters(v212, v213, v198, v196p);
            var v239 = fun.Inters(v212, v213, v199, v197p);
            var v240 = fun.Inters(v212, v213, v200, v198p);
            var v241 = fun.Inters(v212, v213, v201, v199p);
            var v242 = fun.Inters(v212, v213, v202, v200p);
            var v243 = fun.Inters(v212, v213, v203, v201p);
            var v244 = fun.Inters(v212, v213, v204, v202p);
            var v245 = fun.Inters(v212, v213, v205, v203p);
            var v246 = fun.Inters(v212, v213, v206, v204p);
            var v247 = fun.Inters(v212, v213, v207, v205p);
            var v248 = fun.Inters(v212, v213, v208, v206p);
            var v249 = fun.Inters(v212, v213, v207p, fun.Polar(v207p, fun.CalAngle(v206p, v208), 1));
            var v250 = fun.Inters(v209, v213, v207p, v249);
            var v255 = fun.Inters(v253, v254, v175, v215);
            var v256 = fun.Inters(v253, v254, v176, v216);
            var v257 = fun.Inters(v253, v254, v177, v217);
            var v258 = fun.Inters(v253, v254, v178, v218);
            var v259 = fun.Inters(v253, v254, v179, v219);
            var v260 = fun.Inters(v253, v254, v180, v220);
            var v261 = fun.Inters(v253, v254, v181, v221);
            var v262 = fun.Inters(v253, v254, v182, v222);
            var v263 = fun.Inters(v253, v254, v183, v223);
            var v264 = fun.Inters(v253, v254, v184, v224);
            var v265 = fun.Inters(v253, v254, v185, v225);
            var v266 = fun.Inters(v253, v254, v186, v226);
            var v267 = fun.Inters(v253, v254, v187, v227);
            var v268 = fun.Inters(v253, v254, v188, v228);
            var v269 = fun.Inters(v253, v254, v189, v229);
            var v270 = fun.Inters(v253, v254, v190, v230);
            var v271 = fun.Inters(v253, v254, v191, v231);
            var v272 = fun.Inters(v253, v254, v192, v232);
            var v273 = fun.Inters(v253, v254, v193, v233);
            var v274 = fun.Inters(v253, v254, v194, v234);
            var v275 = fun.Inters(v253, v254, v195, v235);
            var v276 = fun.Inters(v253, v254, v196, v236);
            var v277 = fun.Inters(v253, v254, v197, v237);
            var v278 = fun.Inters(v253, v254, v198, v238);
            var v279 = fun.Inters(v253, v254, v199, v239);
            var v280 = fun.Inters(v253, v254, v200, v240);
            var v281 = fun.Inters(v253, v254, v201, v241);
            var v282 = fun.Inters(v253, v254, v202, v242);
            var v283 = fun.Inters(v253, v254, v203, v243);
            var v284 = fun.Inters(v253, v254, v204, v244);
            var v285 = fun.Inters(v253, v254, v205, v245);
            var v286 = fun.Inters(v253, v254, v206, v246);
            var v287 = fun.Inters(v253, v254, v207, v247);
            var v288 = fun.Inters(v253, v254, v208, v248);
            var v289 = fun.Inters(v253, v254, v250, v249);
            var v290 = fun.Inters(v253, v254, v208p, fun.Polar(v208p, fun.CalAngle(v207p, v289), 1));
            var v291 = fun.Inters(v173, v173p, v255, fun.Polar(v255, fun.CalAngle(v180, v178p), 1));
            var v292 = fun.Inters(v175p, v173p, v256, fun.Polar(v256, fun.CalAngle(v180, v178p), 1));





            var line2 = new Line(p52, v92);
            var line3 = new Line(v50, v52);
            var line4 = new Line(v53, v49);
            var line5 = new Line(v54, v48);
            var line6 = new Line(v55, v47);
            var line7 = new Line(v56, v46);
            var line8 = new Line(v57, v45);
            var line9 = new Line(v58, v44);
            var line10 = new Line(v59, v43);
            var line11 = new Line(v60, v42);
            var line12 = new Line(v61, v41);
            var line13 = new Line(v62, v40);
            var line14 = new Line(v63, v39);
            var line15 = new Line(v64, v38);
            var line16 = new Line(v65, v37);
            var line17 = new Line(v66, v36);
            var line18 = new Line(v67, v35);
            var line19 = new Line(v68, v34);
            var line20 = new Line(v69, v33);
            var line21 = new Line(v70, v32);
            var line22 = new Line(v71, v31);
            var line23 = new Line(v72, v30);
            var line24 = new Line(v73, v29);
            var line25 = new Line(v74, v28);
            var line26 = new Line(v75, v27);
            var line27 = new Line(v76, v26);
            var line28 = new Line(v77, v25);
            var line29 = new Line(v78, v24);
            var line30 = new Line(v79, v23);
            var line31 = new Line(v80, v22);
            var line32 = new Line(v81, v21);
            var line33 = new Line(v82, v20);
            var line34 = new Line(v83, v19);
            var line35 = new Line(v84, v18);
            var line36 = new Line(v85, v17);
            var line37 = new Line(v86, v16);
            var line38 = new Line(v87, v15);
            var line39 = new Line(v88, v14);
            var line40 = new Line(v89, v13);
            var line41 = new Line(v90, v12);
            var line42 = new Line(v91, v11);

            var line43 = new Line(v94, v12p);
            var line44 = new Line(v95, v13p);
            var line45 = new Line(v96, v14p);
            var line46 = new Line(v97, v15p);
            var line47 = new Line(v98, v16p);
            var line48 = new Line(v99, v17p);
            var line49 = new Line(v100, v18p);
            var line50 = new Line(v101, v19p);
            var line51 = new Line(v102, v20p);
            var line52 = new Line(v103, v21p);
            var line53 = new Line(v104, v22p);
            var line54 = new Line(v105, v23p);
            var line55 = new Line(v106, v24p);
            var line56 = new Line(v107, v25p);
            var line57 = new Line(v108, v26p);
            var line58 = new Line(v109, v27p);
            var line59 = new Line(v110, v28p);
            var line60 = new Line(v111, v29p);
            var line61 = new Line(v112, v30p);
            var line62 = new Line(v113, v31p);
            var line63 = new Line(v114, v32p);
            var line64 = new Line(v115, v33p);
            var line65 = new Line(v116, v34p);
            var line66 = new Line(v117, v35p);
            var line67 = new Line(v118, v36p);
            var line68 = new Line(v119, v37p);
            var line69 = new Line(v120, v38p);
            var line70 = new Line(v121, v39p);
            var line71 = new Line(v122, v40p);
            var line72 = new Line(v123, v41p);
            var line73 = new Line(v124, v42p);
            var line74 = new Line(v125, v43p);
            var line75 = new Line(v126, v44p);
            var line76 = new Line(v127, v45p);
            var line77 = new Line(v128, v46p);
            var line78 = new Line(v129, v47p);
            var line79 = new Line(v130, v48p);
            var line80 = new Line(v131, v49p);
            var line81 = new Line(v132, v50p);
            var line82 = new Line(v133, v134);
            var line83 = new Line(v135, v93);

            List<Vector3> points = new List<Vector3>
           {
                new Vector3(v92.X, v92.Y, 0),
                new Vector3(v136.X, v136.Y, 0),
                new Vector3(v93.X, v93.Y, 0),
            };

            Spline spline1 = new Spline(points);
            spline1.Layer = contour;
            spline1.Lineweight = Lineweight.W50;
            DxfDocument doc = new DxfDocument();
            dxf.AddEntity(spline1);

            List<Vector3> points1 = new List<Vector3>
           {
                new Vector3(v143.X, v143.Y, 0),
                new Vector3(v149.X, v149.Y, 0),
                new Vector3(v150.X, v150.Y, 0),
                new Vector3(v151.X, v151.Y, 0),
                new Vector3(v152.X, v152.Y, 0),
                new Vector3(v153.X, v153.Y, 0),
                new Vector3(v154.X, v154.Y, 0),
                new Vector3(v148.X, v148.Y, 0),
                new Vector3(v155.X, v155.Y, 0),
                new Vector3(v156.X, v156.Y, 0),
                new Vector3(v157.X, v157.Y, 0),
                new Vector3(v166.X, v166.Y, 0),
                new Vector3(v171.X, v171.Y, 0),
                new Vector3(v170.X, v170.Y, 0),
                new Vector3(v169.X, v169.Y, 0),
                new Vector3(v168.X, v168.Y, 0),
                new Vector3(v167.X, v167.Y, 0),
                new Vector3(v160.X, v160.Y, 0),

            };

            Spline spline2 = new Spline(points1);
            spline2.Layer = contour;
            spline2.Lineweight = Lineweight.W50;
            DxfDocument doc1 = new DxfDocument();
            dxf.AddEntity(spline2);

            List<Vector3> points2 = new List<Vector3>
           {
                new Vector3(v213.X, v213.Y, 0),
                new Vector3(v251.X, v251.Y, 0),
                new Vector3(v254.X, v254.Y, 0),
            };

            Spline spline3 = new Spline(points2);
            spline3.Layer = contour;
            spline3.Lineweight = Lineweight.W50;
            DxfDocument doc3 = new DxfDocument();
            dxf.AddEntity(spline3);


            var polyline4 = Pus.AddPointsToLwPolyLine(v92, v11, v10, v6, v6p, v10p, v11p, v93);
            var polyline5 = Pus.Fillet4LwPline(polyline4, 2, (tcpd - dconms) / 2.0);
            var polyline6 = Pus.Fillet4LwPline(polyline5, 6, (tcpd - dconms) / 2.0);

            var line84 = new Line(v143, v160);
            var line85 = new Line(v140, v138);
            var line86 = new Line(v138, v141);
            var line87 = new Line(v142, v148);
            var line88 = new Line(v158, v166);
            var line89 = new Line(v144, v149);
            var line90 = new Line(v150, v145);
            var line91 = new Line(v152, v146);
            var line92 = new Line(v153, v147);
            var line93 = new Line(v159, v161);
            var line94 = new Line(v162, v167);
            var line95 = new Line(v163, v169);
            var line96 = new Line(v164, v170);
            var line97 = new Line(v165, v171);
            var line98 = new Line(v212, v213);
            var line99 = new Line(v253, v254);

            var line100 = new Line(v174, v214);
            var line101 = new Line(v175, v215);
            var line102 = new Line(v176, v216);
            var line103 = new Line(v177, v217);
            var line104 = new Line(v178, v218);
            var line105 = new Line(v179, v219);
            var line106 = new Line(v180, v220);
            var line107 = new Line(v181, v221);
            var line108 = new Line(v182, v222);
            var line109 = new Line(v183, v223);
            var line110 = new Line(v184, v224);
            var line111 = new Line(v185, v225);
            var line112 = new Line(v186, v226);
            var line113 = new Line(v187, v227);
            var line114 = new Line(v188, v228);
            var line115 = new Line(v189, v229);
            var line116 = new Line(v190, v230);
            var line117 = new Line(v191, v231);
            var line118 = new Line(v192, v232);
            var line119 = new Line(v193, v233);
            var line120 = new Line(v194, v234);
            var line121 = new Line(v195, v235);
            var line122 = new Line(v196, v236);
            var line123 = new Line(v197, v237);
            var line124 = new Line(v198, v238);
            var line125 = new Line(v199, v239);
            var line126 = new Line(v200, v240);
            var line127 = new Line(v201, v241);
            var line128 = new Line(v202, v242);
            var line129 = new Line(v203, v243);
            var line130 = new Line(v204, v244);
            var line131 = new Line(v205, v245);
            var line132 = new Line(v206, v246);
            var line133 = new Line(v207, v247);
            var line134 = new Line(v208, v248);
            var line135 = new Line(v209, v249);
            var line136 = new Line(v255, v291);
            var line137 = new Line(v256, v292);
            var line138 = new Line(v257, v175p);
            var line139 = new Line(v258, v176p);
            var line140 = new Line(v259, v177p);
            var line141 = new Line(v260, v178p);
            var line142 = new Line(v261, v179p);
            var line143 = new Line(v262, v180p);
            var line144 = new Line(v263, v181p);
            var line145 = new Line(v264, v182p);
            var line146 = new Line(v265, v183p);
            var line147 = new Line(v266, v184p);
            var line148 = new Line(v267, v185p);
            var line149 = new Line(v268, v186p);
            var line150 = new Line(v269, v187p);
            var line151 = new Line(v270, v188p);
            var line152 = new Line(v271, v189p);
            var line153 = new Line(v272, v190p);
            var line154 = new Line(v273, v191p);
            var line155 = new Line(v274, v192p);
            var line156 = new Line(v275, v193p);
            var line157 = new Line(v276, v194p);
            var line158 = new Line(v277, v195p);
            var line159 = new Line(v278, v196p);
            var line160 = new Line(v279, v197p);
            var line161 = new Line(v280, v198p);
            var line162 = new Line(v281, v199p);
            var line163 = new Line(v282, v200p);
            var line164 = new Line(v283, v201p);
            var line165 = new Line(v284, v202p);
            var line166 = new Line(v285, v203p);
            var line167 = new Line(v286, v204p);
            var line168 = new Line(v287, v205p);
            var line169 = new Line(v288, v206p);
            var line170 = new Line(v289, v207p);
            var line171 = new Line(v290, v208p);
            var line172 = new Line(v209, v213);
            var line173 = new Line(v209p, v254);
            

            var polyline7 = Pus.AddPointsToLwPolyLine(v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v51p, v50p, v49p, v48p, v47p, v46p, v45p, v44p, v43p, v42p, v41p, v40p, v39p, v38p, v37p, v36p, v35p, v34p, v33p, v32p, v31p, v30p, v29p, v28p, v27p, v26p, v25p, v24p, v23p, v22p, v21p, v20p, v19p, v18p, v17p, v16p, v15p, v14p, v13p, v12p, v11p);
            var polyline8 = Pus.AddPointsToLwPolyLine(v211, v210, v209, v208, v207, v206, v205, v204, v203, v202, v201, v200, v199, v198, v197, v196, v195, v194, v193, v192, v191, v190, v189, v188, v187, v186, v185, v184, v183, v182, v181, v180, v179, v178, v177, v176, v175, v173, v173p, v175p, v176p, v177p, v178p, v179p, v180p, v181p, v182p, v183p, v184p, v185p, v186p, v187p, v188p, v189p, v190p, v191p, v192p, v193p, v194p, v195p, v196p, v197p, v198p, v199p, v200p, v201p, v202p, v203p, v204p, v205p, v206p, v207p, v208p, v209p, v210p, v211p);
            var polyline9 = Pus.Fillet4LwPline(polyline8, 1, 2.56);
            var polyline10 = Pus.Fillet4LwPline(polyline9, 75, 2.56);

            //dxf.AddEntity(new EntityObject[] { arc1, arc2, arc3, arc4, line1, polyline1, polyline2, polyline3, polyline6, polyline7, polyline10 });
            //dxf.AddEntity(new EntityObject[] { line2, line3, line4, line5, line6, line7, line8, line9, line10, line11, line12, line13, line14, line15, line16, line17, line18, line19, line20, line21, line22, line23, line24, line25, line26, line27, line28, line29, line30, line31, line32, line33, line34, line35, line36, line37, line38, line39, line40, line41, line42 });
            //dxf.AddEntity(new EntityObject[] { line43, line44, line45, line46, line47, line48, line49, line50, line51, line52, line53, line54, line55, line56, line57, line58, line59, line60, line61, line62, line63, line64, line65, line66, line67, line68, line69, line70, line71, line72, line73, line74, line75, line76, line77, line78, line79, line80, line81, line82, line83 });
            //dxf.AddEntity(new EntityObject[] { line84, line85, line86, line87, line88, line89, line90, line91, line92, line93, line94, line95, line96, line97, line98, line99 });
            //dxf.AddEntity(new EntityObject[] { line100, line101, line102, line103, line104, line105, line106, line107, line108, line109, line110, line111, line112, line113, line114, line115, line116, line117, line118, line119, line120, line121, line122, line123, line124, line125, line126, line127, line128, line129, line130, line131, line132, line133, line134, line135, line136, line137, line138, line139, line140, line141, line142, line143, line144, line145, line146, line147, line148, line149, line150, line151, line152, line153, line154, line155, line156, line157, line158, line159, line160, line161, line162, line163, line164, line165, line166, line167, line168, line169, line170, line171, line172, line173 });


            fun.drawBArc(dxf, arc1, 0.2, contour);
            fun.drawBArc(dxf, arc2, 0.2, contour);
            fun.drawBArc(dxf, arc3, 0.2, contour);
            fun.drawBArc(dxf, arc4, 0.2, contour);
            fun.drawBline(dxf, line1, 0.2, contour);
            fun.drawBline(dxf, line2, 0.2, contour);
            fun.drawBline(dxf, line3, 0.2, contour);
            fun.drawBline(dxf, line4, 0.2, contour);
            fun.drawBline(dxf, line5, 0.2, contour);
            fun.drawBline(dxf, line6, 0.2, contour);
            fun.drawBline(dxf, line7, 0.2, contour);
            fun.drawBline(dxf, line8, 0.2, contour);
            fun.drawBline(dxf, line9, 0.2, contour);
            fun.drawBline(dxf, line10, 0.2, contour);
            fun.drawBline(dxf, line11, 0.2, contour);
            fun.drawBline(dxf, line12, 0.2, contour);
            fun.drawBline(dxf, line13, 0.2, contour);
            fun.drawBline(dxf, line14, 0.2, contour);
            fun.drawBline(dxf, line15, 0.2, contour);
            fun.drawBline(dxf, line16, 0.2, contour);
            fun.drawBline(dxf, line17, 0.2, contour);
            fun.drawBline(dxf, line18, 0.2, contour);
            fun.drawBline(dxf, line19, 0.2, contour);
            fun.drawBline(dxf, line20, 0.2, contour);
            fun.drawBline(dxf, line21, 0.2, contour);
            fun.drawBline(dxf, line22, 0.2, contour);
            fun.drawBline(dxf, line23, 0.2, contour);
            fun.drawBline(dxf, line24, 0.2, contour);
            fun.drawBline(dxf, line25, 0.2, contour);
            fun.drawBline(dxf, line26, 0.2, contour);
            fun.drawBline(dxf, line27, 0.2, contour);
            fun.drawBline(dxf, line28, 0.2, contour);
            fun.drawBline(dxf, line29, 0.2, contour);
            fun.drawBline(dxf, line30, 0.2, contour);
            fun.drawBline(dxf, line31, 0.2, contour);
            fun.drawBline(dxf, line32, 0.2, contour);
            fun.drawBline(dxf, line33, 0.2, contour);
            fun.drawBline(dxf, line34, 0.2, contour);
            fun.drawBline(dxf, line35, 0.2, contour);
            fun.drawBline(dxf, line36, 0.2, contour);
            fun.drawBline(dxf, line37, 0.2, contour);
            fun.drawBline(dxf, line38, 0.2, contour);
            fun.drawBline(dxf, line39, 0.2, contour);
            fun.drawBline(dxf, line40, 0.2, contour);
            fun.drawBline(dxf, line41, 0.2, contour);
            fun.drawBline(dxf, line42, 0.2, contour);
            fun.drawBline(dxf, line43, 0.2, contour);
            fun.drawBline(dxf, line44, 0.2, contour);
            fun.drawBline(dxf, line45, 0.2, contour);
            fun.drawBline(dxf, line46, 0.2, contour);
            fun.drawBline(dxf, line47, 0.2, contour);
            fun.drawBline(dxf, line48, 0.2, contour);
            fun.drawBline(dxf, line49, 0.2, contour);
            fun.drawBline(dxf, line50, 0.2, contour);
            fun.drawBline(dxf, line51, 0.2, contour);
            fun.drawBline(dxf, line52, 0.2, contour);
            fun.drawBline(dxf, line53, 0.2, contour);
            fun.drawBline(dxf, line54, 0.2, contour);
            fun.drawBline(dxf, line55, 0.2, contour);
            fun.drawBline(dxf, line56, 0.2, contour);
            fun.drawBline(dxf, line57, 0.2, contour);
            fun.drawBline(dxf, line58, 0.2, contour);
            fun.drawBline(dxf, line59, 0.2, contour);
            fun.drawBline(dxf, line60, 0.2, contour);
            fun.drawBline(dxf, line61, 0.2, contour);
            fun.drawBline(dxf, line62, 0.2, contour);
            fun.drawBline(dxf, line63, 0.2, contour);
            fun.drawBline(dxf, line64, 0.2, contour);
            fun.drawBline(dxf, line65, 0.2, contour);
            fun.drawBline(dxf, line66, 0.2, contour);
            fun.drawBline(dxf, line67, 0.2, contour);
            fun.drawBline(dxf, line68, 0.2, contour);
            fun.drawBline(dxf, line69, 0.2, contour);
            fun.drawBline(dxf, line70, 0.2, contour);
            fun.drawBline(dxf, line71, 0.2, contour);
            fun.drawBline(dxf, line72, 0.2, contour);
            fun.drawBline(dxf, line73, 0.2, contour);
            fun.drawBline(dxf, line74, 0.2, contour);
            fun.drawBline(dxf, line75, 0.2, contour);
            fun.drawBline(dxf, line76, 0.2, contour);
            fun.drawBline(dxf, line77, 0.2, contour);
            fun.drawBline(dxf, line78, 0.2, contour);
            fun.drawBline(dxf, line79, 0.2, contour);
            fun.drawBline(dxf, line80, 0.2, contour);
            fun.drawBline(dxf, line81, 0.2, contour);
            fun.drawBline(dxf, line82, 0.2, contour);
            fun.drawBline(dxf, line83, 0.2, contour);
            fun.drawBline(dxf, line84, 0.2, contour);
            fun.drawBline(dxf, line85, 0.2, contour);
            fun.drawBline(dxf, line86, 0.2, contour);
            fun.drawBline(dxf, line87, 0.2, contour);
            fun.drawBline(dxf, line88, 0.2, contour);
            fun.drawBline(dxf, line89, 0.2, contour);
            fun.drawBline(dxf, line90, 0.2, contour);
            fun.drawBline(dxf, line91, 0.2, contour);
            fun.drawBline(dxf, line92, 0.2, contour);
            fun.drawBline(dxf, line93, 0.2, contour);
            fun.drawBline(dxf, line94, 0.2, contour);
            fun.drawBline(dxf, line95, 0.2, contour);
            fun.drawBline(dxf, line96, 0.2, contour);
            fun.drawBline(dxf, line97, 0.2, contour);
            fun.drawBline(dxf, line98, 0.2, contour);
            fun.drawBline(dxf, line99, 0.2, contour);
            fun.drawBline(dxf, line100, 0.2, contour);
            fun.drawBline(dxf, line101, 0.2, contour);
            fun.drawBline(dxf, line102, 0.2, contour);
            fun.drawBline(dxf, line103, 0.2, contour);
            fun.drawBline(dxf, line104, 0.2, contour);
            fun.drawBline(dxf, line105, 0.2, contour);
            fun.drawBline(dxf, line106, 0.2, contour);
            fun.drawBline(dxf, line107, 0.2, contour);
            fun.drawBline(dxf, line108, 0.2, contour);
            fun.drawBline(dxf, line109, 0.2, contour);
            fun.drawBline(dxf, line110, 0.2, contour);
            fun.drawBline(dxf, line111, 0.2, contour);
            fun.drawBline(dxf, line112, 0.2, contour);
            fun.drawBline(dxf, line113, 0.2, contour);
            fun.drawBline(dxf, line114, 0.2, contour);
            fun.drawBline(dxf, line115, 0.2, contour);
            fun.drawBline(dxf, line116, 0.2, contour);
            fun.drawBline(dxf, line117, 0.2, contour);
            fun.drawBline(dxf, line118, 0.2, contour);
            fun.drawBline(dxf, line119, 0.2, contour);
            fun.drawBline(dxf, line120, 0.2, contour);
            fun.drawBline(dxf, line121, 0.2, contour);
            fun.drawBline(dxf, line122, 0.2, contour);
            fun.drawBline(dxf, line123, 0.2, contour);
            fun.drawBline(dxf, line124, 0.2, contour);
            fun.drawBline(dxf, line125, 0.2, contour);
            fun.drawBline(dxf, line126, 0.2, contour);
            fun.drawBline(dxf, line127, 0.2, contour);
            fun.drawBline(dxf, line128, 0.2, contour);
            fun.drawBline(dxf, line129, 0.2, contour);
            fun.drawBline(dxf, line130, 0.2, contour);
            fun.drawBline(dxf, line131, 0.2, contour);
            fun.drawBline(dxf, line132, 0.2, contour);
            fun.drawBline(dxf, line133, 0.2, contour);
            fun.drawBline(dxf, line134, 0.2, contour);
            fun.drawBline(dxf, line135, 0.2, contour);
            fun.drawBline(dxf, line136, 0.2, contour);
            fun.drawBline(dxf, line137, 0.2, contour);
            fun.drawBline(dxf, line138, 0.2, contour);
            fun.drawBline(dxf, line139, 0.2, contour);
            fun.drawBline(dxf, line140, 0.2, contour);
            fun.drawBline(dxf, line141, 0.2, contour);
            fun.drawBline(dxf, line142, 0.2, contour);
            fun.drawBline(dxf, line143, 0.2, contour);
            fun.drawBline(dxf, line144, 0.2, contour);
            fun.drawBline(dxf, line145, 0.2, contour);
            fun.drawBline(dxf, line146, 0.2, contour);
            fun.drawBline(dxf, line147, 0.2, contour);
            fun.drawBline(dxf, line148, 0.2, contour);
            fun.drawBline(dxf, line149, 0.2, contour);
            fun.drawBline(dxf, line150, 0.2, contour);
            fun.drawBline(dxf, line151, 0.2, contour);
            fun.drawBline(dxf, line152, 0.2, contour);
            fun.drawBline(dxf, line153, 0.2, contour);
            fun.drawBline(dxf, line154, 0.2, contour);
            fun.drawBline(dxf, line155, 0.2, contour);
            fun.drawBline(dxf, line156, 0.2, contour);
            fun.drawBline(dxf, line157, 0.2, contour);
            fun.drawBline(dxf, line158, 0.2, contour);
            fun.drawBline(dxf, line159, 0.2, contour);
            fun.drawBline(dxf, line160, 0.2, contour);
            fun.drawBline(dxf, line161, 0.2, contour);
            fun.drawBline(dxf, line162, 0.2, contour);
            fun.drawBline(dxf, line163, 0.2, contour);
            fun.drawBline(dxf, line164, 0.2, contour);
            fun.drawBline(dxf, line165, 0.2, contour);
            fun.drawBline(dxf, line166, 0.2, contour);
            fun.drawBline(dxf, line167, 0.2, contour);
            fun.drawBline(dxf, line168, 0.2, contour);
            fun.drawBline(dxf, line169, 0.2, contour);
            fun.drawBline(dxf, line170, 0.2, contour);
            fun.drawBline(dxf, line171, 0.2, contour);
            fun.drawBline(dxf, line172, 0.2, contour);
            fun.drawBline(dxf, line173, 0.2, contour);
            fun.PolyFill(dxf, polyline1, 0.2, contour);
            fun.PolyFill(dxf, polyline2, 0.2, contour);
            fun.PolyFill(dxf, polyline3, 0.2, contour);
            fun.PolyFill(dxf, polyline6, 0.2, contour);
            fun.PolyFill(dxf, polyline7, 0.2, contour);
            fun.PolyFill(dxf, polyline10, 0.2, contour);

            Line line174 = new Line(fun.Polar(v1, 0, 5), fun.Polar(v0, pi, 5));
            line174.Layer = centre;
            line174.Lineweight = Lineweight.W25;
            line174.Linetype = Linetype.DashDot;
            dxf.AddEntity(line174);
            Line line175 = new Line(fun.Polar(v138, pi, 5), fun.Polar(v139, 0, 5));
            line175.Layer = centre;
            line175.Lineweight = Lineweight.W25;
            line175.Linetype = Linetype.DashDot;
            dxf.AddEntity(line175);
            Line line176 = new Line(fun.Polar(v252, 0, 5), fun.Polar(v172, pi, 5));
            line176.Layer = centre;
            line176.Lineweight = Lineweight.W25;
            line176.Linetype = Linetype.DashDot;
            dxf.AddEntity(line176);
            LwPolyline Arc00 = new LwPolyline();
            Arc00.Vertexes.Add(new LwPolylineVertex(v211));
            Arc00.Vertexes.Add(new LwPolylineVertex(v252));
            Arc00.Vertexes.Add(new LwPolylineVertex(v211p));
            Arc00.Vertexes[0].Bulge = Math.Tan(-30 * pi / 180 / 4);
            Arc00.Vertexes[1].Bulge = Math.Tan(30 * pi / 180 / 4);
            Arc00.Lineweight = Lineweight.W50;
            Arc00.Layer = contour;
            dxf.AddEntity(Arc00);



            var height = 2 * scale;//字体高度
            var offset = 10 * scale;//偏移量
            var arrowsize = 1 * scale;//箭头大小
            var exline = 1 * scale;//延伸线长度

            var lpr = 55.38 / 95.92 * oal;
            var ls = 46 / 95.92 * oal;

            fun.dimrot1(dxf, v51, v51p, 90, offset * 0.5, 0, height, arrowsize, exline, "TCPD", "", "");
            fun.dimrot1(dxf, v46, v46p, 90, offset * 1, 0, height, arrowsize, exline, "TD", "", "");
            fun.dimrot1(dxf, v3, v3p, -90, offset * 0.5, 0, height, arrowsize, exline, "DCONMS", "", "");
            fun.dimrot1(dxf, v1, v0, 0, offset * 2, 0, height, arrowsize, exline, "OAL", "", "");
            fun.dimrot1(dxf, fun.Polar(v0, 0, lpr), v0, 0, offset * 1.5, 0, height, arrowsize, exline, "LPR", "", "");
            fun.dimrot1(dxf, v11, v0, 0, offset * 1, 0, height, arrowsize, exline, "THL", "", "");
            fun.dimrot1(dxf, fun.Polar(v1, pi, ls), v1, 0, offset * 1, 0, height, arrowsize, exline, "LS", "", "");
            fun.dimrot1(dxf, v10, v10p, -90, offset * 0.5, 0, height, arrowsize, exline, "DN", "", "");
            fun.dimrot1(dxf, v1, v6p, 180, offset * 1, 180, height, arrowsize, exline, "ORVL", "", "");
            fun.dimrot1(dxf, v30p, v32p, 180, offset * 0.75, 180, height, arrowsize, exline, "TP", "", "");
            fun.dimrot1(dxf, v46p, v0, 180, offset * 1.5, 180, height, arrowsize, exline, "TCL", "", "");
            fun.dimrot1(dxf, fun.Polar(v0, 0, lpr), v46p, 180, offset * 1.5, 180, height, arrowsize, exline, "LTA", "", "");
            fun.dimrot1(dxf, v1, v46p, 180, offset * 2, 180, height, arrowsize, exline, "LF", "", "");
            fun.jt(dxf, fun.Polar(v6p, pi, 0.5 * ls), 290, dconms * 3, height, "CCMS");
            fun.jt(dxf, v18p, 315, dconms * 2, height, "TDZ");
            fun.jt(dxf, fun.Polar(v0, 210 * pi / 180, 4 * td), 0, 15, height, "FDP");
            fun.jt0(dxf, v1, 320, dconms * 2, height, "PCS");
            fun.jt0(dxf, v46p, 220, 10, height, "CRP");
            fun.jt0(dxf, v0, 114, 30, height, "CLP");
            fun.jt0(dxf, fun.Polar(v0, 0, lpr), 278, 30, height, "MCS");


            fun.Axis(dxf, fun.Polar(v1, 300 * pi / 180, dconms * 5), 0, -90, "Z", "X", "Y", 1.5, height, 0);
            fun.Axis(dxf, fun.Polar(v0, 0, lpr), 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, v1, 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, v0, 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, v137, 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, v172, 0, -90, "", "", "", 1, height, 0);






            var v293 = fun.Polar(v0, 0, lpr);
            var v294 = fun.Polar(v293, 90 * pi / 180, 1.5 * dconms);
            var v295 = fun.Polar(v294, 45 * pi / 180, 0.25 * dconms);
            var v296 = fun.Polar(v295, 0 * pi / 180, 0.4 * dconms);
            var v297 = fun.mirrorpoint(v294, v0, v1);
            var v298 = fun.mirrorpoint(v295, v0, v1);
            var v299 = fun.mirrorpoint(v296, v0, v1);

            var polyline11 = Pus.AddPointsToLwPolyLine(v296, v295, v294, v297, v298, v299);
            polyline11.Layer = refin;
            polyline11.Lineweight = Lineweight.W35;
            polyline11.Linetype = Linetype.Dashed;
            dxf.AddEntity(polyline11);


            var v300 = fun.Polar(v1, 45 * pi / 180, 2.5);
            var v301 = fun.Polar(v1, 135 * pi / 180, 2.5);
            var v302 = fun.Polar(v1, -135 * pi / 180, 2.5);
            var v303 = fun.Polar(v1, -45 * pi / 180, 2.5);

            var polyline12 = Pus.AddPointsToLwPolyLine(v300, v301, v302, v303, v300);
            polyline12.Layer = refin;
            polyline12.Lineweight = Lineweight.W35;
            polyline12.Linetype = Linetype.Dashed;
            dxf.AddEntity(polyline12);

            var v304 = fun.Polar(v160, -90 * pi / 180, 25);
            var v305 = fun.Polar(v160, -90 * pi / 180, 27);
            var v306 = fun.Polar(v138, -90 * pi / 180, 50); 
            var v307 = fun.Polar(v138, -90 * pi / 180, 52);

            var line177 = new Line(v160, v305); 
            var line178 = new Line(v138, v307);
            dxf.AddEntity(line177);
            dxf.AddEntity(line178);
            fun.jt(dxf, v304, 0, 25, height, "");
            fun.jt(dxf, v306, 0, 27, height, "");


            Text text1 = new Text("THL", fun.Polar(v304, 5 * pi / 180, 20), height, 0);
            dxf.AddEntity(text1);
            Text text2 = new Text("OAL<LPR", fun.Polar(v306, 5 * pi / 180, 20), height, 0);
            dxf.AddEntity(text2);
            Text text3 = new Text("ISYC = 301 - 03", fun.Polar(v1, 110 * pi / 180, offset * 4), height * 2, 0);
            dxf.AddEntity(text3);
            Text text4 = new Text("变体 A", fun.Polar(v137, 90 * pi / 180, offset * 2), height, 0);
            // dxf.AddEntity(text4);

            fun.text(dxf, fun.Polar(v137, 90 * pi / 180, offset * 2), height, "变体 A");

            var v308 = new Vector2(v172.X - 55, v172.Y + 30);
            var v309 = new Vector2(v172.X + 85, v172.Y + 30);
            var v310 = new Vector2(v172.X + 85, v172.Y - 55);
            var v311 = new Vector2(v172.X - 55, v172.Y - 55);


            var polyline13 = Pus.AddPointsToLwPolyLine(v308, v309, v310, v311, v308);
            polyline13.Layer = refin;
            polyline13.Lineweight = Lineweight.W35;
            polyline13.Linetype = Linetype.Dashed;
            dxf.AddEntity(polyline13);

            var v312 = fun.Polar(v184p, -90 * pi / 180, 28);
            var v313 = fun.Polar(v184p, -90 * pi / 180, 36);
            var v314 = fun.Polar(v184p, -90 * pi / 180, 38);



            fun.dimrot1(dxf, v173, v173p, 90, offset * 1, 0, height, arrowsize, exline, "TCPD", "", "");
            fun.dimrot1(dxf, v184, v184p, 90, offset * 2, 0, height, arrowsize, exline, "TD", "", "");
            fun.dimrot1(dxf, v173p, v184p, 180, offset * 1, 0, height, arrowsize, exline, "TCL", "", "");


            var line179 = new Line(v184p, v314);
            dxf.AddEntity(line179);


            Text text5 = new Text("LF", fun.Polar(v312, 5 * pi / 180, 26), height, 0);
            dxf.AddEntity(text5);
            Text text6 = new Text("LTA", fun.Polar(v313, 5 * pi / 180, 26), height, 0);
            dxf.AddEntity(text6);

            fun.jt(dxf, v312, 0, 20, height, "");
            fun.jt(dxf, v313, 0, 20, height, "");




            fun.jt0(dxf, v172, 110, 20, height, "CIP");
            fun.jt0(dxf, v184p, 318, 10, height, "CRP");

            fun.jdbz2(dxf, new Line(v180p, v188p), new Line(v180, v188), offset * 10, height, arrowsize, exline, "TG", "", "");




            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void ISYC_303_11(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);

            var scale = 1;

            var ls = 38.98;
            var dconms = 21.03;
            var dn = 17.68;
            var tp = 3.5;
            var lu = 74.6;
            var pl = 9.03;
            var dc_2 = 23.32;
            var lf_2 = ls + lu - pl;
            var lf_1 = lf_2 - 3.3;
            var oal = ls + lu;

            var v1 = new Vector2(0, 0);
            var v2p = fun.Polar(v1, 90 * pi / 180, dconms / 2);
            var v2 = fun.Polar(v2p, -90 * pi / 180, 0.97 / 21.03 * dconms);
            var v3 = fun.Polar(v2p, pi, 1.38 / 38.98 * ls);
            var v4 = fun.Polar(v2p, pi, 37.7 / 38.98 * ls);
            var v5p = fun.Polar(v2p, pi, ls);
            var v5 = new Vector2(v5p.X, v1.Y + dn / 2);
            var v21 = fun.Polar(v1, pi, oal);
            var v20 = new Vector2(v21.X + pl, v21.Y + dc_2 / 2);
            var v19 = fun.Polar(v20, 0, 3.3);
            var v18p = fun.Polar(v19, 0, tp / 2);
            var v18 = fun.Inters(v19, fun.Polar(v19, -45 * pi / 180, 1), v18p, fun.Polar(v18p, -90 * pi / 180, 1));
            var v17 = fun.Polar(v19, 0, tp);
            var v16 = fun.Polar(v18, 0, tp);
            var v15 = fun.Polar(v17, 0, tp);
            var v14 = fun.Polar(v16, 0, tp);
            var v13 = fun.Polar(v15, 0, tp);
            var v12 = fun.Polar(v14, 0, tp);
            var v11 = fun.Polar(v13, 0, tp);
            var v10 = fun.Polar(v12, 0, tp);
            var v9 = fun.Polar(v11, 0, tp);
            var v8 = fun.Polar(v10, 0, tp);
            var v7 = fun.Polar(v9, 0, tp);
            var v6 = fun.Inters(v7, fun.Polar(v7, -45 * pi / 180, 1), v5, fun.Polar(v5, pi, 1));
            var v22 = fun.Polar(v5, pi, fun.CalDistance(v5, v6) / 2);
            var v23 = new Vector2(v22.X - 7.06 / 74.6 * lu, v22.Y - 3.52 / 17.68 * dn);
            var v24 = new Vector2(v6.X, v23.Y);
            var v25 = fun.Polar(v7, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v26 = fun.Polar(v8, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v27 = fun.Polar(v9, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v28 = fun.Polar(v10, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v29 = fun.Polar(v11, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v30 = fun.Polar(v12, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v31 = fun.Polar(v13, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v32 = fun.Polar(v14, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v33 = fun.Polar(v15, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v34 = fun.Polar(v16, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v35 = fun.Polar(v17, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v36 = fun.Polar(v18, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v37 = fun.Polar(v19, -90 * pi / 180, 4.98 / 23.32 * dc_2);
            var v38 = fun.mirrorpoint(v2, v1, v21);
            var v39 = fun.mirrorpoint(v3, v1, v21);
            var v40 = fun.mirrorpoint(v4, v1, v21);
            var v41 = fun.mirrorpoint(v5, v1, v21);
            var v42 = fun.mirrorpoint(v6, v1, v21);
            var v43 = fun.mirrorpoint(v7, v1, v21);
            var v44 = fun.mirrorpoint(v8, v1, v21);
            var v45 = fun.mirrorpoint(v9, v1, v21);
            var v46 = fun.mirrorpoint(v10, v1, v21);
            var v47 = fun.mirrorpoint(v11, v1, v21);
            var v48 = fun.mirrorpoint(v12, v1, v21);
            var v49 = fun.mirrorpoint(v13, v1, v21);
            var v50 = fun.mirrorpoint(v14, v1, v21);
            var v51 = fun.mirrorpoint(v15, v1, v21);
            var v52 = fun.mirrorpoint(v16, v1, v21);
            var v53 = fun.mirrorpoint(v17, v1, v21);
            var v54 = fun.mirrorpoint(v18, v1, v21);
            var v55 = fun.mirrorpoint(v19, v1, v21);
            var v56 = fun.mirrorpoint(v20, v1, v21);
            var v57 = fun.Polar(v43, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v58 = fun.Polar(v44, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v59 = fun.Polar(v45, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v60 = fun.Polar(v46, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v61 = fun.Polar(v47, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v62 = fun.Polar(v48, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v63 = fun.Polar(v49, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v64 = fun.Polar(v50, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v65 = fun.Polar(v51, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v66 = fun.Polar(v52, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v67 = fun.Polar(v53, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v68 = fun.Polar(v54, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v69 = fun.Polar(v55, 90 * pi / 180, 3.23 / 23.32 * dc_2);
            var v70 = fun.Polar(v41, pi, 27.17 / 74.6 * lu);
            var v71 = fun.Inters(v19, v55, v1, v21);
            var v72 = fun.Polar(v22, -90 * pi / 180, 11.59 / 17.68 * dn);
            var v73 = fun.Inters(v18, v54, v71, v72);
            var v74 = fun.Inters(v17, v53, v71, v72);
            var v75 = fun.Inters(v16, v52, v71, v72);
            var v76 = fun.Inters(v15, v51, v71, v72);
            var v77 = fun.Inters(v14, v50, v71, v72);
            var v78 = fun.Inters(v13, v49, v71, v72);
            var v79 = fun.Inters(v12, v48, v71, v72);
            var v80 = fun.Inters(v11, v47, v71, v72);
            var v81 = fun.Inters(v10, v46, v71, v72);
            var v82 = fun.Inters(v9, v45, v71, v72);
            var v83 = fun.Inters(v8, v44, v71, v72);
            var v84 = fun.Inters(v7, v43, v71, v72);
            var v85 = fun.Inters(v6, v42, v71, v72);
            var v86 = fun.Polar(v21, pi, 5);
            var v87 = fun.Polar(v1, 0, 5);



            var polyline1 = Pus.AddPointsToLwPolyLine(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v56, v55, v54, v53, v52, v51, v50, v49, v48, v47, v46, v45, v44, v43, v42, v41, v40, v39, v38, v2);
            var polyline2 = Pus.AddPointsToLwPolyLine(v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37);
            var polyline3 = Pus.AddPointsToLwPolyLine(v37, v71, v72);
            var polyline4 = Pus.AddPointsToLwPolyLine(v55, v69, v68, v67, v66, v65, v64, v63, v62, v61, v60, v59, v58, v57, v43);


            fun.PolyFill(dxf, polyline1, 0.25, contour);
            fun.PolyFill(dxf, polyline2, 0.25, contour);
            fun.PolyFill(dxf, polyline3, 0.25, contour);
            fun.PolyFill(dxf, polyline4, 0.25, contour);

            LwPolyline polyline5 = new LwPolyline();
            polyline5.Vertexes.Add(new LwPolylineVertex(v22));
            polyline5.Vertexes.Add(new LwPolylineVertex(v23));
            polyline5.Vertexes[0].Bulge = Math.Tan(-50 * pi / 180 / 4);
            fun.PolyFill(dxf, polyline5, 0.25, contour);

            LwPolyline polyline6 = new LwPolyline();
            polyline6.Vertexes.Add(new LwPolylineVertex(v37));
            polyline6.Vertexes.Add(new LwPolylineVertex(v21));
            polyline6.Vertexes[0].Bulge = Math.Tan(44 * pi / 180 / 4);
            fun.PolyFill(dxf, polyline6, 0.25, contour);

            LwPolyline polyline7 = new LwPolyline();
            polyline7.Vertexes.Add(new LwPolylineVertex(v72));
            polyline7.Vertexes.Add(new LwPolylineVertex(v70));
            polyline7.Vertexes[0].Bulge = Math.Tan(-66 * pi / 180 / 4);
            fun.PolyFill(dxf, polyline7, 0.25, contour);


            var line1 = new Line(v36, v73);
            var line2 = new Line(v35, v74);
            var line3 = new Line(v34, v75);
            var line4 = new Line(v33, v76);
            var line5 = new Line(v32, v77);
            var line6 = new Line(v31, v78);
            var line7 = new Line(v30, v79);
            var line8 = new Line(v29, v80);
            var line9 = new Line(v28, v81);
            var line10 = new Line(v27, v82);
            var line11 = new Line(v26, v83);
            var line12 = new Line(v25, v84);
            var line13 = new Line(v24, v85);
            var line14 = new Line(v68, v54);
            var line15 = new Line(v67, v53);
            var line16 = new Line(v66, v52);
            var line17 = new Line(v65, v51);
            var line18 = new Line(v64, v50);
            var line19 = new Line(v63, v49);
            var line20 = new Line(v62, v48);
            var line21 = new Line(v61, v47);
            var line22 = new Line(v60, v46);
            var line23 = new Line(v59, v45);
            var line24 = new Line(v58, v44);
            var line25 = new Line(v5, v41);
            var line26 = new Line(v4, v40);
            var line27 = new Line(v3, v39);

            fun.drawBline(dxf, line1, 0.25, contour);
            fun.drawBline(dxf, line2, 0.25, contour);
            fun.drawBline(dxf, line3, 0.25, contour);
            fun.drawBline(dxf, line4, 0.25, contour);
            fun.drawBline(dxf, line5, 0.25, contour);
            fun.drawBline(dxf, line6, 0.25, contour);
            fun.drawBline(dxf, line7, 0.25, contour);
            fun.drawBline(dxf, line8, 0.25, contour);
            fun.drawBline(dxf, line9, 0.25, contour);
            fun.drawBline(dxf, line10, 0.25, contour);
            fun.drawBline(dxf, line11, 0.25, contour);
            fun.drawBline(dxf, line12, 0.25, contour);
            fun.drawBline(dxf, line13, 0.25, contour);
            fun.drawBline(dxf, line14, 0.25, contour);
            fun.drawBline(dxf, line15, 0.25, contour);
            fun.drawBline(dxf, line16, 0.25, contour);
            fun.drawBline(dxf, line17, 0.25, contour);
            fun.drawBline(dxf, line18, 0.25, contour);
            fun.drawBline(dxf, line19, 0.25, contour);
            fun.drawBline(dxf, line20, 0.25, contour);
            fun.drawBline(dxf, line21, 0.25, contour);
            fun.drawBline(dxf, line22, 0.25, contour);
            fun.drawBline(dxf, line23, 0.25, contour);
            fun.drawBline(dxf, line24, 0.25, contour);
            fun.drawBline(dxf, line25, 0.25, contour);
            fun.drawBline(dxf, line26, 0.25, contour);
            fun.drawBline(dxf, line27, 0.25, contour);



            Line line28 = new Line(v86, v87);
            line28.Layer = centre;
            line28.Lineweight = Lineweight.W25;
            line28.Linetype = Linetype.DashDot;
            dxf.AddEntity(line28);



            var height = 2 * scale;//字体高度
            var offset = 10 * scale;//偏移量
            var arrowsize = 1 * scale;//箭头大小
            var exline = 1 * scale;//延伸线长度

            fun.Axis(dxf, v21, 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, v1, 0, -90, "", "", "", 1, height, 0);
            fun.Axis(dxf, fun.Polar(v1, pi, 30.75 / 38.89 * ls), 0, -90, "", "", "", 1, height, 0);

            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
    }
}
